Method filesystem.more.getFileId
Overload
Gets FileId of a file or directory.
public static bool getFileId(string path, out FileId fileId, bool ofSymlink = false)
Parameters
path (string)
Path of a file or directory. Supports environment variables (see pathname.expand) and paths relative to current directory. |
fileId (FileId) |
ofSymlink (bool)
If path is of a symbolic link, get FileId of the link, not of its target. |
Returns
Exceptions
ArgumentException
Not full path. |
Remarks
Calls API GetFileInformationByHandle.
A file id can be used to uniquely identify a file or directory regardless of path format.
Note: later the function can get a different id for the same path. For example after deleting the file and then creating new file at the same path (some apps save files in this way). You may want to use filesystem.more.getFinalPath instead.