FileStatus Struct Reference

The complete description of a file's attributes. More...

#include <file.h>

Collaboration diagram for FileStatus:
Collaboration graph
[legend]

List of all members.

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&)

Detailed Description

The complete description of a file's attributes.

Definition at line 346 of file file.h.


Member Typedef Documentation

typedef off_t file_size_t

file_size_t data type of the 'size' of the file

Definition at line 351 of file file.h.


Constructor & Destructor Documentation

FileStatus (  ) 

Definition at line 359 of file file.h.


Member Function Documentation

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.

Here is the caller graph for this function:

string group2string ( int  id  )  [static]

Definition at line 1057 of file file.cxx.

Here is the caller graph for this function:

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.

Here is the caller graph for this function:

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.

Here is the call graph for this function:


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  o,
FileStatus const &  r 
) [friend]

operator<<(stream, FileStatus const&)

Output the FileStatus to a stream as a string.

Definition at line 385 of file file.h.


Member Data Documentation

int group_id

the group id of the file

Definition at line 357 of file file.h.

the FileMode of the file

Definition at line 353 of file file.h.

int owner_id

the user id of the file's owner

Definition at line 356 of file file.h.

the size of the file

Definition at line 354 of file file.h.

the FileTime of the file

Definition at line 355 of file file.h.


The documentation for this struct was generated from the following files:
Generated on Wed Feb 29 22:55:29 2012 for CXXUtilities by  doxygen 1.6.3