#include <FileUtils.h>
|
enum | EFileTypes {
FT_REGULAR,
FT_DIRECTORY,
FT_CHARACTER,
FT_BLOCK,
FT_FIFO,
FT_LINK,
FT_SOCK
} |
|
enum | EFileAttr {
FA_Name,
FA_Size,
FA_ATime,
FA_MTime,
FA_CTime,
FA_UID
} |
|
|
| CFile () |
|
| CFile (const CString &sLongName) |
|
| ~CFile () |
|
void | SetFileName (const CString &sLongName) |
|
bool | IsReg (bool bUseLstat=false) const |
|
bool | IsDir (bool bUseLstat=false) const |
|
bool | IsChr (bool bUseLstat=false) const |
|
bool | IsBlk (bool bUseLstat=false) const |
|
bool | IsFifo (bool bUseLstat=false) const |
|
bool | IsLnk (bool bUseLstat=true) const |
|
bool | IsSock (bool bUseLstat=false) const |
|
bool | Exists () const |
|
off_t | GetSize () const |
|
time_t | GetATime () const |
|
time_t | GetMTime () const |
|
time_t | GetCTime () const |
|
uid_t | GetUID () const |
|
gid_t | GetGID () const |
|
bool | Delete () |
|
bool | Move (const CString &sNewFileName, bool bOverwrite=false) |
|
bool | Copy (const CString &sNewFileName, bool bOverwrite=false) |
|
bool | Chmod (mode_t mode) |
|
bool | Seek (off_t uPos) |
|
bool | Truncate () |
|
bool | Sync () |
|
bool | Open (const CString &sFileName, int iFlags=O_RDONLY, mode_t iMode=0644) |
|
bool | Open (int iFlags=O_RDONLY, mode_t iMode=0644) |
|
ssize_t | Read (char *pszBuffer, int iBytes) |
|
bool | ReadLine (CString &sData, const CString &sDelimiter="\n") |
|
bool | ReadFile (CString &sData, size_t iMaxSize=512 *1024) |
|
ssize_t | Write (const char *pszBuffer, size_t iBytes) |
|
ssize_t | Write (const CString &sData) |
|
void | Close () |
|
void | ClearBuffer () |
|
bool | TryExLock (const CString &sLockFile, int iFlags=O_RDWR|O_CREAT) |
|
bool | TryExLock () |
|
bool | ExLock () |
|
bool | UnLock () |
|
bool | IsOpen () const |
|
CString | GetLongName () const |
|
CString | GetShortName () const |
|
CString | GetDir () const |
|
bool | HadError () const |
|
void | ResetError () |
|
|
static bool | IsReg (const CString &sLongName, bool bUseLstat=false) |
|
static bool | IsDir (const CString &sLongName, bool bUseLstat=false) |
|
static bool | IsChr (const CString &sLongName, bool bUseLstat=false) |
|
static bool | IsBlk (const CString &sLongName, bool bUseLstat=false) |
|
static bool | IsFifo (const CString &sLongName, bool bUseLstat=false) |
|
static bool | IsLnk (const CString &sLongName, bool bUseLstat=true) |
|
static bool | IsSock (const CString &sLongName, bool bUseLstat=false) |
|
static bool | FType (const CString &sFileName, EFileTypes eType, bool bUseLstat=false) |
|
static bool | Exists (const CString &sFile) |
|
static off_t | GetSize (const CString &sFile) |
|
static time_t | GetATime (const CString &sFile) |
|
static time_t | GetMTime (const CString &sFile) |
|
static time_t | GetCTime (const CString &sFile) |
|
static uid_t | GetUID (const CString &sFile) |
|
static gid_t | GetGID (const CString &sFile) |
|
static int | GetInfo (const CString &sFile, struct stat &st) |
|
static bool | Delete (const CString &sFileName) |
|
static bool | Move (const CString &sOldFileName, const CString &sNewFileName, bool bOverwrite=false) |
|
static bool | Copy (const CString &sOldFileName, const CString &sNewFileName, bool bOverwrite=false) |
|
static bool | Chmod (const CString &sFile, mode_t mode) |
|
static void | InitHomePath (const CString &sFallback) |
|
static const CString & | GetHomePath () |
|
Enumerator |
---|
FA_Name |
|
FA_Size |
|
FA_ATime |
|
FA_MTime |
|
FA_CTime |
|
FA_UID |
|
Enumerator |
---|
FT_REGULAR |
|
FT_DIRECTORY |
|
FT_CHARACTER |
|
FT_BLOCK |
|
FT_FIFO |
|
FT_LINK |
|
FT_SOCK |
|
CFile::CFile |
( |
const CString & |
sLongName | ) |
|
bool CFile::Chmod |
( |
mode_t |
mode | ) |
|
static bool CFile::Chmod |
( |
const CString & |
sFile, |
|
|
mode_t |
mode |
|
) |
| |
|
static |
void CFile::ClearBuffer |
( |
| ) |
|
bool CFile::Copy |
( |
const CString & |
sNewFileName, |
|
|
bool |
bOverwrite = false |
|
) |
| |
static bool CFile::Copy |
( |
const CString & |
sOldFileName, |
|
|
const CString & |
sNewFileName, |
|
|
bool |
bOverwrite = false |
|
) |
| |
|
static |
static bool CFile::Delete |
( |
const CString & |
sFileName | ) |
|
|
static |
bool CFile::Exists |
( |
| ) |
const |
static bool CFile::Exists |
( |
const CString & |
sFile | ) |
|
|
static |
static bool CFile::FType |
( |
const CString & |
sFileName, |
|
|
EFileTypes |
eType, |
|
|
bool |
bUseLstat = false |
|
) |
| |
|
static |
time_t CFile::GetATime |
( |
| ) |
const |
static time_t CFile::GetATime |
( |
const CString & |
sFile | ) |
|
|
static |
time_t CFile::GetCTime |
( |
| ) |
const |
static time_t CFile::GetCTime |
( |
const CString & |
sFile | ) |
|
|
static |
gid_t CFile::GetGID |
( |
| ) |
const |
static gid_t CFile::GetGID |
( |
const CString & |
sFile | ) |
|
|
static |
static const CString& CFile::GetHomePath |
( |
| ) |
|
|
inlinestatic |
static int CFile::GetInfo |
( |
const CString & |
sFile, |
|
|
struct stat & |
st |
|
) |
| |
|
static |
CString CFile::GetLongName |
( |
| ) |
const |
time_t CFile::GetMTime |
( |
| ) |
const |
static time_t CFile::GetMTime |
( |
const CString & |
sFile | ) |
|
|
static |
CString CFile::GetShortName |
( |
| ) |
const |
off_t CFile::GetSize |
( |
| ) |
const |
static off_t CFile::GetSize |
( |
const CString & |
sFile | ) |
|
|
static |
uid_t CFile::GetUID |
( |
| ) |
const |
static uid_t CFile::GetUID |
( |
const CString & |
sFile | ) |
|
|
static |
bool CFile::HadError |
( |
| ) |
const |
|
inline |
static void CFile::InitHomePath |
( |
const CString & |
sFallback | ) |
|
|
static |
static bool CFile::IsBlk |
( |
const CString & |
sLongName, |
|
|
bool |
bUseLstat = false |
|
) |
| |
|
static |
bool CFile::IsBlk |
( |
bool |
bUseLstat = false | ) |
const |
static bool CFile::IsChr |
( |
const CString & |
sLongName, |
|
|
bool |
bUseLstat = false |
|
) |
| |
|
static |
bool CFile::IsChr |
( |
bool |
bUseLstat = false | ) |
const |
static bool CFile::IsDir |
( |
const CString & |
sLongName, |
|
|
bool |
bUseLstat = false |
|
) |
| |
|
static |
bool CFile::IsDir |
( |
bool |
bUseLstat = false | ) |
const |
static bool CFile::IsFifo |
( |
const CString & |
sLongName, |
|
|
bool |
bUseLstat = false |
|
) |
| |
|
static |
bool CFile::IsFifo |
( |
bool |
bUseLstat = false | ) |
const |
static bool CFile::IsLnk |
( |
const CString & |
sLongName, |
|
|
bool |
bUseLstat = true |
|
) |
| |
|
static |
bool CFile::IsLnk |
( |
bool |
bUseLstat = true | ) |
const |
bool CFile::IsOpen |
( |
| ) |
const |
static bool CFile::IsReg |
( |
const CString & |
sLongName, |
|
|
bool |
bUseLstat = false |
|
) |
| |
|
static |
bool CFile::IsReg |
( |
bool |
bUseLstat = false | ) |
const |
static bool CFile::IsSock |
( |
const CString & |
sLongName, |
|
|
bool |
bUseLstat = false |
|
) |
| |
|
static |
bool CFile::IsSock |
( |
bool |
bUseLstat = false | ) |
const |
bool CFile::Move |
( |
const CString & |
sNewFileName, |
|
|
bool |
bOverwrite = false |
|
) |
| |
static bool CFile::Move |
( |
const CString & |
sOldFileName, |
|
|
const CString & |
sNewFileName, |
|
|
bool |
bOverwrite = false |
|
) |
| |
|
static |
bool CFile::Open |
( |
const CString & |
sFileName, |
|
|
int |
iFlags = O_RDONLY , |
|
|
mode_t |
iMode = 0644 |
|
) |
| |
bool CFile::Open |
( |
int |
iFlags = O_RDONLY , |
|
|
mode_t |
iMode = 0644 |
|
) |
| |
ssize_t CFile::Read |
( |
char * |
pszBuffer, |
|
|
int |
iBytes |
|
) |
| |
bool CFile::ReadFile |
( |
CString & |
sData, |
|
|
size_t |
iMaxSize = 512 *1024 |
|
) |
| |
bool CFile::ReadLine |
( |
CString & |
sData, |
|
|
const CString & |
sDelimiter = "\n" |
|
) |
| |
void CFile::ResetError |
( |
| ) |
|
|
inline |
bool CFile::Seek |
( |
off_t |
uPos | ) |
|
void CFile::SetFileName |
( |
const CString & |
sLongName | ) |
|
bool CFile::TryExLock |
( |
const CString & |
sLockFile, |
|
|
int |
iFlags = O_RDWR|O_CREAT |
|
) |
| |
bool CFile::TryExLock |
( |
| ) |
|
ssize_t CFile::Write |
( |
const char * |
pszBuffer, |
|
|
size_t |
iBytes |
|
) |
| |
ssize_t CFile::Write |
( |
const CString & |
sData | ) |
|
Absolute filename (m_sPath + "/" + m_sShortName)
Filename alone, without path.
The documentation for this class was generated from the following file: