#include <FXFile.h>
Public Types | |
enum | { OtherRead, OtherWrite, OtherExec, OtherReadWrite, OtherFull, GroupRead, GroupWrite, GroupExec, GroupReadWrite, GroupFull, OwnerRead, OwnerWrite, OwnerExec, OwnerReadWrite, OwnerFull, Hidden, Directory, File, SymLink, SetUser, SetGroup, Sticky, Character, Block, Socket, Fifo } |
enum | { NoAccess, ReadOnly, WriteOnly, ReadWrite, Append, Truncate, Create, Exclusive, NonBlocking, TextTranslate, Reading, Writing } |
enum | { Begin, Current, End } |
Public Member Functions | |
FXDEPRECATEDEXT | FXFile () |
FXDEPRECATEDEXT | FXFile (const FXString &file, FXuint mode=FXIO::Reading, FXuint perm=FXIO::OwnerReadWrite|FXIO::GroupReadWrite|FXIO::OtherReadWrite) |
QFile & | qfile () |
const QFile & | qfile () const |
virtual bool | open (const FXString &file, FXuint mode=FXIO::Reading, FXuint perm=FXIO::OwnerReadWrite|FXIO::GroupReadWrite|FXIO::OtherReadWrite) |
virtual FXlong | position () const |
virtual FXlong | position (FXlong offset, FXuint from=FXIO::Begin) |
virtual FXival | readBlock (void *data, FXival count) |
virtual FXival | writeBlock (const void *data, FXival count) |
virtual FXlong | truncate (FXlong size) |
virtual bool | flush () |
virtual FXlong | size () |
virtual bool | eof () |
virtual bool | close () |
virtual | ~FXFile () |
virtual bool | open (FXInputHandle handle, FXuint mode) |
virtual bool | isOpen () const |
FXuint | mode () const |
Static Public Member Functions | |
static bool | create (const FXString &file, FXuint perm=FXIO::OwnerReadWrite|FXIO::GroupReadWrite|FXIO::OtherReadWrite) |
static bool | remove (const FXString &file) |
static bool | rename (const FXString &srcfile, const FXString &dstfile) |
static bool | link (const FXString &srcfile, const FXString &dstfile) |
static FXString | symlink (const FXString &file) |
static bool | symlink (const FXString &srcfile, const FXString &dstfile) |
static bool | identical (const FXString &file1, const FXString &file2) |
static bool | copy (const FXString &srcfile, const FXString &dstfile, bool overwrite=false) |
static bool | concat (const FXString &srcfile1, const FXString &srcfile2, const FXString &dstfile, bool overwrite=false) |
static bool | copyFiles (const FXString &srcfile, const FXString &dstfile, bool overwrite=false) |
static bool | moveFiles (const FXString &srcfile, const FXString &dstfile, bool overwrite=false) |
static bool | removeFiles (const FXString &path, bool recursive=false) |
Protected Attributes | |
FXInputHandle | device |
FXuint | access |
anonymous enum [inherited] |
File modes.
anonymous enum [inherited] |
Access modes.
anonymous enum [inherited] |
FXDEPRECATEDEXT FX::FXFile::FXFile | ( | ) | [inline] |
Construct file.
FXDEPRECATEDEXT FX::FXFile::FXFile | ( | const FXString & | file, | |
FXuint | mode = FXIO::Reading , |
|||
FXuint | perm = FXIO::OwnerReadWrite|FXIO::GroupReadWrite|FXIO::OtherReadWrite | |||
) |
Construct file and attach existing handle h.
Construct and open a file
virtual FX::FXFile::~FXFile | ( | ) | [virtual] |
Destroy.
virtual bool FX::FXFile::open | ( | const FXString & | file, | |
FXuint | mode = FXIO::Reading , |
|||
FXuint | perm = FXIO::OwnerReadWrite|FXIO::GroupReadWrite|FXIO::OtherReadWrite | |||
) | [virtual] |
Open file.
virtual FXlong FX::FXFile::position | ( | ) | const [virtual] |
virtual FXlong FX::FXFile::position | ( | FXlong | offset, | |
FXuint | from = FXIO::Begin | |||
) | [virtual] |
virtual FXival FX::FXFile::readBlock | ( | void * | data, | |
FXival | count | |||
) | [virtual] |
virtual FXival FX::FXFile::writeBlock | ( | const void * | data, | |
FXival | count | |||
) | [virtual] |
virtual FXlong FX::FXFile::truncate | ( | FXlong | size | ) | [virtual] |
virtual bool FX::FXFile::flush | ( | ) | [virtual] |
virtual FXlong FX::FXFile::size | ( | ) | [virtual] |
virtual bool FX::FXFile::eof | ( | ) | [virtual] |
virtual bool FX::FXFile::close | ( | ) | [virtual] |
static bool FX::FXFile::create | ( | const FXString & | file, | |
FXuint | perm = FXIO::OwnerReadWrite|FXIO::GroupReadWrite|FXIO::OtherReadWrite | |||
) | [static] |
Create new (empty) file.
static bool FX::FXFile::remove | ( | const FXString & | file | ) | [static] |
Remove file.
Rename or move srcfile to dstfile, replacing dstfile if it exists.
Link file.
Symbolic link file.
Return true if files are identical.
static bool FX::FXFile::copy | ( | const FXString & | srcfile, | |
const FXString & | dstfile, | |||
bool | overwrite = false | |||
) | [static] |
Copy srcfile to dstfile, overwriting dstfile if allowed.
static bool FX::FXFile::concat | ( | const FXString & | srcfile1, | |
const FXString & | srcfile2, | |||
const FXString & | dstfile, | |||
bool | overwrite = false | |||
) | [static] |
Concatenate srcfile1 and srcfile2 to dstfile, overwriting dstfile if allowed.
static bool FX::FXFile::copyFiles | ( | const FXString & | srcfile, | |
const FXString & | dstfile, | |||
bool | overwrite = false | |||
) | [static] |
Recursively copy files or directories from srcfile to dstfile, overwriting dstfile if allowed.
static bool FX::FXFile::moveFiles | ( | const FXString & | srcfile, | |
const FXString & | dstfile, | |||
bool | overwrite = false | |||
) | [static] |
Recursively copy or move files or directories from srcfile to dstfile, overwriting dstfile if allowed.
static bool FX::FXFile::removeFiles | ( | const FXString & | path, | |
bool | recursive = false | |||
) | [static] |
Recursively remove file or directory, recurse if allowed.
virtual bool FX::FXIO::open | ( | FXInputHandle | handle, | |
FXuint | mode | |||
) | [virtual, inherited] |
virtual bool FX::FXIO::isOpen | ( | ) | const [virtual, inherited] |
Return true if open.
FXuint FX::FXIO::mode | ( | ) | const [inline, inherited] |
Return access mode.