Skip to main content

FStatus

FStatus refNum

The FStatus operation provides file status information for a file.

Parameters

refNum is a file reference number obtained from the Open operation.

Details

FStatus supports files of any length.

FStatus sets the following variables:

V_flagNonzero (true) if refNum is valid, in which case FStatus sets the other variables as well.
V_filePosCurrent file position for the file in bytes from the start.
In Igor 7 or later, if you only want to know the current file position, use FGetPos instead of FStatus, which is slower.
V_logEOFTotal number of bytes in the file.
S_fileName(string) the name of the file.
S_pathPath from the volume to the folder containing the file. For example, "hd:Folder1:Folder2:". This is suitable for use as an input to the NewPath operation. Note that on the Windows operating system, Igor uses a colon between folders instead of the Windows-standard backslash to avoid confusion with Igor's use of backslash to start an escape sequence (see Escape Sequences in Strings).
S_infoKeyword-packed information string.

The keyword-packed information string for S_info consists of a sequence of sections with the following form: keyword:value; You can pick a value out of a keyword-packed string using the NumberByKey and StringByKey functions.

Here are the keywords for S_info:

KeywordTypeMeaning
PATHstringName of the symbolic path in which the file is located. This will be empty if there is no such symbolic path.
WRITEABLEnumber1 if file can be written to, 0 if not.

See Also

Open, FGetPos, FSetPos