Skip to content

StatFileSystemObject (file/dir)

ts
function StatFileSystemObject(what: string): DirListItem;

This function returns the stat information for the what file/directory in the local file-system. If the object doesn't exist the returned information contains an empty/blank DirListItem record.

This function accepts the following parameters:

ParameterTypeRequirementExplanation
whatstringrequiredmust be a valid and existing path to a file or directory in a local file system

Example return value:

json
{
  "Name": "testfile.txt",
  "Type": "FILE",
  "Size": 1777,
  "TimeStamp": 1683729626897 // use ToDate() to convert this to a JS Date() object if needed
}