Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members

FX::FXFile Class Reference

Low level file access. More...

#include <FXFile.h>

Inheritance diagram for FX::FXFile:

FX::FXIO List of all members.

Public Member Functions

 FXFile ()
 FXFile (FXInputHandle handle, FXuint mode)
 FXFile (const FXString &file, FXuint mode=FXIO::Reading, FXuint perm=FXIO::OwnerReadWrite|FXIO::GroupReadWrite|FXIO::OtherReadWrite)
virtual bool open (const FXString &file, FXuint mode=FXIO::Reading, FXuint perm=FXIO::OwnerReadWrite|FXIO::GroupReadWrite|FXIO::OtherReadWrite)
virtual bool open (FXInputHandle handle, FXuint mode)
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 ()

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)

Detailed Description

Low level file access.


Constructor & Destructor Documentation

FX::FXFile::FXFile  )  [inline]
 

Construct file.

FX::FXFile::FXFile FXInputHandle  handle,
FXuint  mode
 

Construct file and attach existing handle h.

FX::FXFile::FXFile const FXString file,
FXuint  mode = FXIO::Reading,
FXuint  perm = FXIO::OwnerReadWrite|FXIO::GroupReadWrite|FXIO::OtherReadWrite
 

Construct and open a file.

virtual FX::FXFile::~FXFile  )  [virtual]
 

Destroy.


Member Function Documentation

virtual bool FX::FXFile::open const FXString file,
FXuint  mode = FXIO::Reading,
FXuint  perm = FXIO::OwnerReadWrite|FXIO::GroupReadWrite|FXIO::OtherReadWrite
[virtual]
 

Open file.

virtual bool FX::FXFile::open FXInputHandle  handle,
FXuint  mode
[virtual]
 

Open device with access mode and handle.

Reimplemented from FX::FXIO.

virtual FXlong FX::FXFile::position  )  const [virtual]
 

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.

Copyright © 1997-2005 Jeroen van der Zijp