FILESTAT: Returns a file with regard to the following rights for the status:
● Read (r: read)
● Write (w: write)
● Execute (x: execute)
● Show (s: show)
● Delete (d: delete)
Note:
These protection levels are specific properties of the passive file system. When
accessing an external program memory, FILESTAT therefore supplies default
access rights (77777).
FILEINFO: For a file, supplies the sum of the information, which can be read out
via FILEDATE, FILETIME, FILESIZE and FILESTAT
<Error>: Variable for returning the error value (call-by-reference parameter)
Type. VAR INT
Value: 0 No error
1 Path not allowed
2 Path not found
3 File not found
4 Incorrect file type
13 Insufficient access rights
22 String length of the result variable (<result>) is too small.
<file name>: Name of the file from which the file information is to be read out
Type: CHAR[160]
The absolute path can be specified before the actual file name. If a path is not
specified, the file is searched for in the current directory (= directory of selected
program).
Rules regarding path data, see "Addressing program memory files (Page 554)".
<result>: Result variable (Call-By-Reference parameter)
Variable in which the requested file information is stored.
Type: VAR CHAR[8]
at FILEDATE
Format: "dd.mm.yy"
VAR CHAR[8] at FILETIME
Format: "hh.mm.ss"
VAR INT at FILESIZE
The file size is output in bytes.
VAR CHAR[5] at FILESTAT
Format: "rwxsd"
(r: read, w: write, x: execute, s: show,
d: delete)
VAR CHAR[32] at FILEINFO
Format: "rwxsd nnnnnnnn dd.mm.yy
hh:mm:ss"
Work preparation
3.5 File handling
NC programming
Programming Manual, 12/2019, 6FC5398-2EP40-0BA0 573