The complete description of a file's attributes. More...
#include <file.h>
Public Types | |
typedef off_t | file_size_t |
file_size_t data type of the 'size' of the file | |
Public Member Functions | |
std::string | convert_to_string (bool resolve_id_names=false) const |
std::string convert_to_string(bool resolve_id_names=false) const; | |
FileStatus () | |
operator std::string () const | |
Automatic conversion to a string. This convert the FileStatus to a string without mapping id's to names. | |
Static Public Member Functions | |
static std::string | group2string (int id) |
static std::string | id2string (int id) |
id2string(int) use this to convert owner id's to strings | |
Public Attributes | |
int | group_id |
the group id of the file | |
FileMode | mode |
the FileMode of the file | |
int | owner_id |
the user id of the file's owner | |
file_size_t | size |
the size of the file | |
FileTime | time |
the FileTime of the file | |
Friends | |
std::ostream & | operator<< (std::ostream &o, FileStatus const &r) |
operator<<(stream, FileStatus const&) |
The complete description of a file's attributes.
Definition at line 346 of file file.h.
typedef off_t file_size_t |
FileStatus | ( | ) |
string convert_to_string | ( | bool | resolve_id_names = false |
) | const |
std::string convert_to_string(bool resolve_id_names=false) const;
Optionally convert id's into their string names (slow). The string looks like this:
"rwxrwxrwx 12/28/57 01:02:03 owner_id group_id size name".
convert the file's status (ie attributes) into a string -- optionally resolving the user and group id numbers into string names. This can be time consuming, so it is optional.
Definition at line 539 of file file.cxx.
string group2string | ( | int | id | ) | [static] |
string id2string | ( | int | id | ) | [static] |
id2string(int) use this to convert owner id's to strings
id2string(int) is a static method that converts user id numbers to strings.
Definition at line 1038 of file file.cxx.
operator std::string | ( | ) | const |
Automatic conversion to a string. This convert the FileStatus to a string without mapping id's to names.
Definition at line 378 of file file.h.
std::ostream& operator<< | ( | std::ostream & | o, | |
FileStatus const & | r | |||
) | [friend] |
operator<<(stream, FileStatus const&)
Output the FileStatus to a stream as a string.