FileStat:getFileStatus
Method
Description:
This method returns status information for the directory(s) or file(s) contained in the specified directory whose names match the specified regular expression. Use a regular expression to query the status of a set of files. The regular expression can only be used on the file name portion of the input parameter. For example
c:/temp/.*
This expression queries all the files in c:/temp
directory.
c:/temp/.*.tmp
This queries all the files in c:/temp
directory that have the .tmp
suffix.
Remarks
The arguments and return values for this method are different for Microsoft Windows and Unix platforms.
Type
Synchronous, IMPACT_INFO.
Microsoft Windows Only Arguments
Name |
Type |
Description |
Directory |
String |
Name of the directory to be searched. No entry indicates the current directory. Regular expressions are not allowed for this argument. |
File Name |
String |
Name of the file to query |
Unix Only Arguments
Name |
Type |
Description |
File Name |
String |
Absolute path and name of the file to query |
Common to Both Microsoft Windows and Unix Returns
Name |
Type |
Description |
File Name |
String |
Name of the file to query. Table is indexed on the File Name |
File Size |
Long |
Total size of the file in bytes |
Is Directory |
Boolean |
The handle identifies a directory |
Seconds Since Accessed |
Integer |
Number of seconds elapsed since last access |
Seconds Since Modified |
Integer |
Number of seconds elapsed since last modified |
Seconds Since Creation |
Integer |
(Microsoft Windows only) Number of seconds elapsed since creation. (UNIX only) Number of seconds since last status change. |
Microsoft Windows Only Returns
Name |
Type |
Description |
Alt File Name |
String |
(Microsoft Windows only) The alternate file name of this file or directory. This name is in the classic 8.3 (filename.ext) file name format. |
Is Read Only |
Boolean |
(Microsoft Windows only) The file or directory is read-only. Applications can read the file but cannot write to it or delete it. In the case of a directory, applications cannot delete it. |
Is Hidden |
Boolean |
(Microsoft Windows only) The file or directory is hidden. It is not included in an ordinary directory listing. |
Is System |
Boolean |
(Microsoft Windows only) The file or directory is part of the operating system or is used exclusively by the operating system. |
Is Archive |
Boolean |
(Microsoft Windows only) The file or directory is an archive file or directory. Applications use this attribute to mark files for backup or removal. |
Is Encrypted |
Boolean |
(Microsoft Windows only) The file or directory is encrypted. For a file, this means that all data in the file is encrypted. For a directory, this means that encryption is the default for newly created files and subdirectories. |
Is Normal |
Boolean |
(Microsoft Windows only) The file or directory has no other attributes set. This attribute is valid only if used alone. |
Is Offline |
Boolean |
(Microsoft Windows only) The file data is not immediately available. This attribute indicates that the file data has been physically moved to offline storage. This attribute is used by Remote Storage, the hierarchical storage management software. Applications should not arbitrarily change this attribute. |
Has Reparse Point |
Boolean |
(Microsoft Windows only) The file has an associated reparse point. |
Is Sparse |
Boolean |
(Microsoft Windows only) The file is a sparse file. |
Is Temporary |
Boolean |
(Microsoft Windows only) The file is being used for temporary storage. File systems attempt to keep all of the data in memory for quicker access, rather than flushing it back to mass storage. A temporary file should be deleted by the application as soon as it is no longer needed. |
Unix Only Returns
Name |
Type |
Description |
Major |
Integer |
Major number of the device on which the file resides |
Minor |
Integer |
Minor number of the device on which the file resides |
Inode |
Integer |
File inode number |
Mode |
String |
File mode as octal mask |
Is Character Special |
Boolean |
This file is a character special file |
Is Pipe |
Boolean |
This file is a pipe (FIFO) |
Is Regular |
Boolean |
This file is a regular file |
Is Readable |
Boolean |
This file has readable permission set |
Is Writable |
Boolean |
This file has writable permission set |
Is Executable |
Boolean |
This file has executable permission set |
Links |
Integer |
Count of hard links to the file |
User |
String |
User name of the owner |
Group |
String |
Group name of the owner |