Name
file_stat — get various OS statistics about a file
Synopsis
file_stat
(
|
in path varchar , |
in
what
integer
) ; |
Description
file_stat
returns various information for
an OS file by calling stat () system call and converting the
relevant value to a varchar
. The path is relative
to the server's working directory. The what is an integer value
selecting what information to return. If you don't supply second
argument to the function it defaults to mode = 0.
The DirsAllowed and DirsDenied lists in Parameters section of the virtuoso configuration file (virtuoso.ini by default) are not used to control disk access.
Parameters
path
varchar relative path.
what
integer info to be returned.
0 - (default) file modification time (st_mtime) |
1 - file size (st_size, bytes) |
2 - file mode (st_mode, as integer) |
3 - file modification time for directories only (st_mtime) |
4 - file owner (user name corresponding to st_uid) |
5 - file group (group name corresponding to st_gid) |
Examples
Example 24.116. Simple example
Get the size of the virtuoso INI file
SQL>select file_stat (virtuoso_ini_path(), 1); callret VARCHAR _______________________________________________________________________________ 958