JX Application Framework
|
#include <JDirEntry.h>
Public Types | |
enum | Type { kDoesNotExist = 0 , kDir , kFile , kUnknown , kDirLink , kFileLink , kBrokenLink , kUnknownLink } |
enum | ModeBit { kOtherExec = 0 , kOtherWrite , kOtherRead , kGroupExec , kGroupWrite , kGroupRead , kUserExec , kUserWrite , kUserRead } |
Public Member Functions | |
JDirEntry (const JString &fullName) | |
JDirEntry (const JString &pathName, const JString &fileName) | |
JDirEntry (const JDirEntry &source) | |
~JDirEntry () | |
JDirEntry & | operator= (const JDirEntry &source) |
const JString & | GetPath () const |
const JString & | GetName () const |
const JString & | GetFullName () const |
bool | GetLinkName (const JString **linkName) const |
const JString & | GetUserName () const |
const JString & | GetGroupName () const |
Type | GetType () const |
bool | IsFile () const |
bool | IsDirectory () const |
bool | IsLink () const |
bool | IsWorkingLink () const |
bool | IsBrokenLink () const |
bool | IsUnknown () const |
JSize | GetSize () const |
mode_t | GetMode () const |
JError | SetMode (const mode_t mode) |
JError | SetMode (const ModeBit bit, const bool allow) |
JString | GetModeString () const |
bool | IsReadable () const |
bool | IsWritable () const |
bool | IsExecutable () const |
time_t | GetModTime () const |
time_t | GetStatusTime () const |
time_t | GetAccessTime () const |
JIndex | GetUserID () const |
JIndex | GetGroupID () const |
JDirEntry | FollowLink () const |
bool | NeedsUpdate () const |
bool | Update (const bool force=false) |
void | ForceUpdate () |
bool | MatchesContentFilter (const JRegex ®ex, const JSize kBlockSize=1024) const |
Static Public Member Functions | |
static std::weak_ordering | CompareNames (JDirEntry *const &e1, JDirEntry *const &e2) |
static std::weak_ordering | CompareSizes (JDirEntry *const &e1, JDirEntry *const &e2) |
static std::weak_ordering | CompareModTimes (JDirEntry *const &e1, JDirEntry *const &e2) |
Friends | |
class | JDirInfo |
Class representing an item in a directory. This class was not designed to be a base class.
enum JDirEntry::ModeBit |
enum JDirEntry::Type |
JDirEntry::JDirEntry | ( | const JString & | fullName | ) |
JDirEntry::JDirEntry | ( | const JDirEntry & | source | ) |
JDirEntry::~JDirEntry | ( | ) |
|
static |
JDirEntry JDirEntry::FollowLink | ( | ) | const |
Returns a new object that describes what we point to. If we are not a link, we return a copy of ourselves.
void JDirEntry::ForceUpdate | ( | ) |
Updates the entry, regardless of whether or not it needs it.
|
inline |
|
inline |
|
inline |
const JString & JDirEntry::GetGroupName | ( | ) | const |
|
inline |
JString JDirEntry::GetModeString | ( | ) | const |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
const JString & JDirEntry::GetUserName | ( | ) | const |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
This returns true for any file that matches the regex.
bool JDirEntry::NeedsUpdate | ( | ) | const |
Returns true if the entry needs to be updated.
JError JDirEntry::SetMode | ( | const mode_t | mode | ) |
If necessary, updates the entry. Returns true if the entry needed to be updated.
|
friend |