
The FSTAT? command can be used to query file- and disk related information. FSTAT? can be called with zero or one argument. If no argument is given, FSTAT? shows the disk parameters, that is, file system, media size and number of free Kbytes.
No Argument: FSTAT? shows general disk information
File or directory name : FSTAT? shows information related to the given object
When mass storage device is not available or damaged:
NO DISK
When called without argument and disk is present:
xxx SIZE:yyy FREE:zzz, where xxx is the file system type (FAT12, FAT16, FAT23, RAW), yyy is the total size and zzz is the size of free bytes.
When called with a file name:
filename size date time, attributes (separated by spaces). The attributes field can contain the characters R(read only), H(hidden), S(system), A(archive bit set)
When called with a directory name:
dirname, 0, date, time, D in contrast to the file output, the first value is always 0 and the last is always D(directory).
FSTAT?
Example output might be: FAT16 SIZE: 1981024 FREE:1955232
FSTAT? autorun.txt
When autorun.txt is a file, example output is: autorun.txt 17 2010/10/04 18:03:16 A
FSTAT? mydir
When mydir is a directory, example output is: mydir 0 2010/04/17 13:21:18 D
Only modules with some kind of mass storage (SD-Card, USB-Stick) support this command.