File information.
More...
#include <base/filesystem/FileInfo.h>
Inherits Object.
|
enum | Sticky { SET_UID = 0x4000,
SET_GID = 0x2000,
RESTRICT = 0x1000,
STICKY_MASK = SET_UID|SET_GID|RESTRICT
} |
|
enum | Permissions {
RUSR = 0x400,
WUSR = 0x200,
XUSR = 0x100,
RWXU = RUSR|WUSR|XUSR,
RGRP = 0x40,
WGRP = 0x20,
XGRP = 0x10,
RWXG = RGRP|WGRP|XGRP,
ROTH = 0x4,
WOTH = 0x2,
XOTH = 0x1,
RWXO = ROTH|WOTH|XOTH,
PERMISSION_MASK = RWXU|RWXG|RWXO
} |
|
File information.
File information wrapper class.
- Version
- 1.2
- Examples
- testsuite/ls.cpp.
◆ Permissions
Permissions.
Enumerator |
---|
RUSR | Read permission for the owner of the file.
|
WUSR | Write permission for the owner of the file.
|
XUSR | Execute permission for the owner of the file.
|
RWXU | Read, write, and execute permissions for the owner of the file.
|
RGRP | Read permission for the group associated with the file.
|
WGRP | Write permission for the group associated with the file.
|
XGRP | Execute permission for the group associated with the file.
|
RWXG | Read, write, and execute permissions for the group associated with the file.
|
ROTH | Read permission for other users.
|
WOTH | Write permission for other users.
|
XOTH | Execute permission for other users.
|
RWXO | Read, write, and execute permissions for other users.
|
PERMISSION_MASK | Any access.
|
◆ Sticky
Sticky bit.
Enumerator |
---|
SET_UID | Set user id on execution.
|
SET_GID | Set group id on execution.
|
RESTRICT | Restrict flag.
|
STICKY_MASK | All sticky bits.
|
◆ FileInfo()
FileInfo::FileInfo |
( |
const String & |
path | ) |
|
Initializes a file.
- Parameters
-
path | the path of the file. |
◆ getGroup()
const Group& FileInfo::getGroup |
( |
| ) |
const |
|
inlinenoexcept |
◆ getLastAccess()
const Date& FileInfo::getLastAccess |
( |
| ) |
const |
|
inlinenoexcept |
Returns the last access time of the file.
◆ getLastChange()
const Date& FileInfo::getLastChange |
( |
| ) |
const |
|
inlinenoexcept |
Returns the last chnage time of the file.
◆ getLastModification()
const Date& FileInfo::getLastModification |
( |
| ) |
const |
|
inlinenoexcept |
◆ getLinks()
unsigned int FileInfo::getLinks |
( |
| ) |
const |
|
inlinenoexcept |
Returns the number of links to the file.
- Returns
- 0 is not supported.
- Examples
- testsuite/ls.cpp.
◆ getMode()
unsigned int FileInfo::getMode |
( |
| ) |
const |
|
inlinenoexcept |
Returns the mode of the file.
- Returns
- The maximum possible value if mode isn't supported.
- Examples
- testsuite/ls.cpp.
◆ getOwner()
const User& FileInfo::getOwner |
( |
| ) |
const |
|
inlinenoexcept |
◆ getPath()
const String& FileInfo::getPath |
( |
| ) |
const |
|
inlinenoexcept |
Returns the path of the file.
◆ getSize()
long long FileInfo::getSize |
( |
| ) |
const |
|
inlinenoexcept |