package diskusage class DiskUsageForm( initialFolder : File ) : PromptForm( "Disk Usage" ) { constructor() : this( homeFolder() ) val folder = folderProperty( "Folder", initialFolder ) /** * Typically, we only care about the largest files/folders, so this can be quite small. * The default is 1000. */ val maxEntries = intProperty( "Max Entries", 1000 ) /** * By default, sizes are based on the number of blocks that files consume. * Therefore, a file of size 1 byte will be reported as 4.1 kB or 4.0KiB (if a block size is 4096 bytes) * * Setting this to `true` will report the file as 1 byte. * Using this setting will drastically underestimate your disk usage if you have lots of small files. */ val apparentSize = boolProperty( "Apparent Size", false ) override meth elements() = listOf( folder, maxEntries, apparentSize ) override meth runner() = DiskUsageBehaviour( this ) }