Navigation

Operators and Keywords

Function List:

C++ API

: fileattrib (file)
: fileattrib ()
: [status, msg, msgid] = fileattrib (…)

Return information about file.

If successful, status is 1 and msg is 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.

If attrib fails, msg is a non-empty string containing an error message and msg_id is the non-empty string "fileattrib".

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