Project

General

Profile

$disk » History » Revision 8

Revision 7 (Per Amundsen, 03/17/2016 05:16 PM) → Revision 8/10 (Per Amundsen, 10/09/2016 12:38 AM)

_Added in 1.9.0_ 

 *$disk* 

 In /sysinfo [N:] and /diskinfo [N:] will return the drive letter [N:] used as parameter. 

 If the [N;] parameter is not defined, $disk will return $null. 

 ---------------------------- 

 _Added in 1.9.0_ 

 *$disk(path|N)* 

 Returns information about the specified hard disk, where N = 0 for total available drives, and N > 0 to access each drive. 

 If no properties is defined, returns [[$true]] if hard disk exists, otherwise [[$false]]. 

 _[[$disk]] with no parameters in /sysinfo [N:] and /diskinfo [N:] will return the drive letter [N:] used as parameter._ 

 *Parameters* 

 path|N - The hard disk letter (C:) or the Nth hard disk. 

 *Properties* 

 .type - Type of hard disk. (unknown, norootdirectory, removable, fixed, network, cdrom, ram) 
 .free - Number of free bytes available. 
 .label - Label of the hard disk. 
 .size - Total number of bytes. 
 .unc - The "UNC":https://en.wikipedia.org/wiki/Uniform_Naming_Convention path for a network drive. (\\x.x.x.x\dir) 
 .path - The hard drive letter/path (C:\) 

 *Examples* 

 <pre> 
 ; Print total number of hard drives. 
 echo -ag Total number of hard drives is $disk(0) 

 ; Print some hard drive info of the first drive. 
 echo -ag The first hard drive is $bytes($disk(1).size).suf in size and have $bytes($disk(1).free).suf free space. 
 </pre>