Navigation

Operators and Keywords

Function List:

C++ API

Function File: [status, result, msgid] = fileattrib (file)

Return information about file.

If successful, status is 1, with result containing a structure with the following fields:

Name

Full name of file.

archive

True if file is an archive (Windows).

system

True if file is a system file (Windows).

hidden

True if file is a hidden file (Windows).

directory

True if file is a directory.

UserRead
GroupRead
OtherRead

True if the user (group; other users) has read permission for file.

UserWrite
GroupWrite
OtherWrite

True if the user (group; other users) has write permission for file.

UserExecute
GroupExecute
OtherExecute

True if the user (group; other users) has execute permission for file.

If an attribute does not apply (i.e., archive on a Unix system) then the field is set to NaN.

With no input arguments, return information about the current directory.

If file contains globbing characters, return information about all the matching files.

See also: glob.

Package: octave