FX::FXFile Class Reference

#include <FXFile.h>

Inheritance diagram for FX::FXFile:

Inheritance graph
[legend]

List of all members.


Detailed Description

Low level file access.

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)
QFileqfile ()
const QFileqfile () 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

Member Enumeration Documentation

anonymous enum [inherited]

File modes.

Enumerator:
OtherRead  Permissions.
OtherWrite  Others have read permission.
OtherExec  Others have write permisson.
OtherReadWrite  Others have execute permission.
OtherFull  Others have read and write permission.
GroupRead  Others have full access.
GroupWrite  Group has read permission.
GroupExec  Group has write permission.
GroupReadWrite  Group has execute permission.
GroupFull  Group has read and write permission.
OwnerRead  Group has full access.
OwnerWrite  Owner has read permission.
OwnerExec  Owner has write permission.
OwnerReadWrite  Owner has execute permission.
OwnerFull  Owner has read and write permission.
Hidden  Owner has full access.

Other flags

Directory  Hidden file.
File  Is directory.
SymLink  Is regular file.
SetUser  Is symbolic link.

Special mode bits

SetGroup  Set user id.
Sticky  Set group id.
Character  Sticky bit.

Device special files

Block  Character device.
Socket  Block device.
Fifo  Socket device.

anonymous enum [inherited]

Access modes.

Enumerator:
NoAccess  Basic access options.
ReadOnly  No access.
WriteOnly  Open for reading.
ReadWrite  Open for writing.
Append  Open for read and write.
Truncate  Open for append.
Create  Truncate to zero when writing.
Exclusive  Create if it doesn't exist.
NonBlocking  Fail if trying to create a file which already exists.
TextTranslate  Non-blocking i/o.
Reading  Perform text translation.

Convenience access options

Writing  Normal options for reading.

anonymous enum [inherited]

Positioning modes.

Enumerator:
Current  Position from the begin (default).
End  Position relative to current position.


Constructor & Destructor Documentation

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.


Member Function Documentation

QFile& FX::FXFile::qfile (  )  [inline]

Returns the underlying FX::QFile.

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]

Open device with access mode and handle.

Get current file position

Reimplemented from FX::FXIO.

virtual FXlong FX::FXFile::position ( FXlong  offset,
FXuint  from = FXIO::Begin 
) [virtual]

Change file position, returning new position from start.

Reimplemented from FX::FXIO.

virtual FXival FX::FXFile::readBlock ( void *  data,
FXival  count 
) [virtual]

Read block of bytes, returning number of bytes read.

Reimplemented from FX::FXIO.

virtual FXival FX::FXFile::writeBlock ( const void *  data,
FXival  count 
) [virtual]

Write block of bytes, returning number of bytes written.

Reimplemented from FX::FXIO.

virtual FXlong FX::FXFile::truncate ( FXlong  size  )  [virtual]

Truncate file.

Reimplemented from FX::FXIO.

virtual bool FX::FXFile::flush (  )  [virtual]

Flush to disk.

Reimplemented from FX::FXIO.

virtual FXlong FX::FXFile::size (  )  [virtual]

Return file size.

Reimplemented from FX::FXIO.

virtual bool FX::FXFile::eof (  )  [virtual]

Test if we're at the end.

Reimplemented from FX::FXIO.

virtual bool FX::FXFile::close (  )  [virtual]

Close file.

Reimplemented from FX::FXIO.

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.

static bool FX::FXFile::rename ( const FXString srcfile,
const FXString dstfile 
) [static]

Rename or move srcfile to dstfile, replacing dstfile if it exists.

static bool FX::FXFile::link ( const FXString srcfile,
const FXString dstfile 
) [static]

Link file.

static FXString FX::FXFile::symlink ( const FXString file  )  [static]

Read symbolic link.

static bool FX::FXFile::symlink ( const FXString srcfile,
const FXString dstfile 
) [static]

Symbolic link file.

static bool FX::FXFile::identical ( const FXString file1,
const FXString file2 
) [static]

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]

Open device with access mode and handle.

Reimplemented in FX::FXPipe, and FX::FXSocket.

virtual bool FX::FXIO::isOpen (  )  const [virtual, inherited]

Return true if open.

FXuint FX::FXIO::mode (  )  const [inline, inherited]

Return access mode.


The documentation for this class was generated from the following file:

(C) 2002-2008 Niall Douglas. Some parts (C) to assorted authors.
Generated on Fri Jun 13 21:58:43 2008 for TnFOX by doxygen v1.5.6