Return a structure info containing the following information about file or file identifier fid.
devID of device containing a directory entry for this file.
inoFile number of the file.
modeFile mode, as an integer. Use the functions S_ISREG,
S_ISDIR, S_ISCHR, S_ISBLK,
S_ISFIFO, S_ISLNK, or S_ISSOCK to extract
information from this value.
modestrFile mode, as a string of ten letters or dashes as would be returned by ls -l.
nlinkNumber of links.
uidUser ID of file’s owner.
gidGroup ID of file’s group.
rdevID of device for block or character special files.
sizeSize in bytes.
atimeTime of last access in the same form as time values returned from
time. See ‘Timing Utilities’.
mtimeTime of last modification in the same form as time values returned from
time. See ‘Timing Utilities’.
ctimeTime of last file status change in the same form as time values
returned from time. See ‘Timing Utilities’.
blksizeSize of blocks in the file.
blocksNumber of blocks allocated for file.
If the call is successful err is 0 and msg is an empty string. If the file does not exist, or some other error occurs, info is an empty matrix, err is -1, and msg contains the corresponding system error message.
If file is a symbolic link, stat will return information about
the actual file that is referenced by the link. Use lstat if you
want information about the symbolic link itself.
For example:
[info, err, msg] = stat ("/vmlinuz")
⇒ info =
{
atime = 855399756
rdev = 0
ctime = 847219094
uid = 0
size = 389218
blksize = 4096
mtime = 847219094
gid = 6
nlink = 1
blocks = 768
mode = -rw-r--r--
modestr = -rw-r--r--
ino = 9316
dev = 2049
}
⇒ err = 0
⇒ msg =
See also: lstat, ls, dir.
Package: octave