Sourceforge.net - The VCF's Project Host
   The VCF Website Home   |   Online Discussion Forums   |   Sourceforge.net Project Page   

VCF::OSXFilePeer Class Reference

#include <OSXFilePeer.h>

Inheritance diagram for VCF::OSXFilePeer:

VCF::Object VCF::FilePeer List of all members.

Public Types

enum  { MaxRequestCountPerIteration = ((4096 * 4) / sizeof(FSCatalogInfo)) }

Public Member Functions

 OSXFilePeer (File *file, const String &fileName="")
virtual ~OSXFilePeer ()
String getName ()
virtual void setFile (File *file)
 close any open handles, reset all internal data, and it associates itself to a given file instance.
virtual uint64 getSize ()
 gets the size of the file in bytes
virtual void updateStat (File::StatMask statMask)
 updates the informations about the file from the file system
virtual void setFileAttributes (const File::FileAttributes fileAttributes)
 set the fileAttributes of the file
virtual bool isExecutable ()
 tells if the file can be run by the OS.
virtual void setDateModified (const DateTime &dateModified)
 set the modification Date of the file
virtual DateTime getDateModified ()
 get the modification date of the file
virtual DateTime getDateCreated ()
 get the creation date of the file
virtual DateTime getDateAccessed ()
 get the latest date the file has been accessed.
virtual void open (const String &fileName, uint32 openFlags=File::ofRead, File::ShareFlags shareFlags=File::shMaskAny)
 opens a file with read/write access Closes the old one if previously opened
virtual void close ()
 closes the file if open it can be called even if it was not opened
virtual void create (uint32 openFlags)
 creates a new file if the last character in the filename is a directory character, then a directory is created instead of a file.
virtual void remove ()
 deletes the file from the file system
virtual void move (const String &newFileName)
 renames/moves a file
virtual void copyTo (const String &copyFileName)
 copies the file into another one
virtual void initFileSearch (Directory::Finder *finder)
virtual FilefindNextFileInSearch (Directory::Finder *finder)
virtual void endFileSearch (Directory::Finder *finder)
int getFileHandle ()

Classes

struct  FileSearchData

Member Enumeration Documentation

anonymous enum
 

Enumerator:
MaxRequestCountPerIteration 


Constructor & Destructor Documentation

VCF::OSXFilePeer::OSXFilePeer File file,
const String fileName = ""
 

virtual VCF::OSXFilePeer::~OSXFilePeer  )  [virtual]
 


Member Function Documentation

virtual void VCF::OSXFilePeer::close  )  [virtual]
 

closes the file if open it can be called even if it was not opened

Implements VCF::FilePeer.

virtual void VCF::OSXFilePeer::copyTo const String copyFileName  )  [virtual]
 

copies the file into another one

Parameters:
fileNameToCopyTo the filename to create/overwrite.

Implements VCF::FilePeer.

virtual void VCF::OSXFilePeer::create uint32  openFlags  )  [virtual]
 

creates a new file if the last character in the filename is a directory character, then a directory is created instead of a file.

The file name is omitted here as this is stored in the File instance kept by the peer.

Implements VCF::FilePeer.

virtual void VCF::OSXFilePeer::endFileSearch Directory::Finder finder  )  [virtual]
 

Implements VCF::FilePeer.

virtual File* VCF::OSXFilePeer::findNextFileInSearch Directory::Finder finder  )  [virtual]
 

Implements VCF::FilePeer.

virtual DateTime VCF::OSXFilePeer::getDateAccessed  )  [virtual]
 

get the latest date the file has been accessed.

Returns:
DateTime, the access date.

Implements VCF::FilePeer.

virtual DateTime VCF::OSXFilePeer::getDateCreated  )  [virtual]
 

get the creation date of the file

Returns:
DateTime, the creation date.

Implements VCF::FilePeer.

virtual DateTime VCF::OSXFilePeer::getDateModified  )  [virtual]
 

get the modification date of the file

Returns:
DateTime, the modification date.

Implements VCF::FilePeer.

int VCF::OSXFilePeer::getFileHandle  )  [inline]
 

String VCF::OSXFilePeer::getName  )  [inline]
 

virtual uint64 VCF::OSXFilePeer::getSize  )  [virtual]
 

gets the size of the file in bytes

Parameters:
uint64 the size

Implements VCF::FilePeer.

virtual void VCF::OSXFilePeer::initFileSearch Directory::Finder finder  )  [virtual]
 

Implements VCF::FilePeer.

virtual bool VCF::OSXFilePeer::isExecutable  )  [virtual]
 

tells if the file can be run by the OS.

Returns:
bool, true if it does.

Implements VCF::FilePeer.

virtual void VCF::OSXFilePeer::move const String newFileName  )  [virtual]
 

renames/moves a file

Parameters:
newFileName the filename

Implements VCF::FilePeer.

virtual void VCF::OSXFilePeer::open const String fileName,
uint32  openFlags = File::ofRead,
File::ShareFlags  shareFlags = File::shMaskAny
[virtual]
 

opens a file with read/write access Closes the old one if previously opened

Parameters:
fileName the desired new filename
openFlags 
shareFlags 

Implements VCF::FilePeer.

virtual void VCF::OSXFilePeer::remove  )  [virtual]
 

deletes the file from the file system

Implements VCF::FilePeer.

virtual void VCF::OSXFilePeer::setDateModified const DateTime dateModified  )  [virtual]
 

set the modification Date of the file

Parameters:
date the desired modification date

Implements VCF::FilePeer.

virtual void VCF::OSXFilePeer::setFile File file  )  [virtual]
 

close any open handles, reset all internal data, and it associates itself to a given file instance.

Parameters:
File* pointer to a File instance

Implements VCF::FilePeer.

virtual void VCF::OSXFilePeer::setFileAttributes const File::FileAttributes  fileAttributes  )  [virtual]
 

set the fileAttributes of the file

Parameters:
fileAttributes the desired attributes

Implements VCF::FilePeer.

virtual void VCF::OSXFilePeer::updateStat File::StatMask  statMask  )  [virtual]
 

updates the informations about the file from the file system

Parameters:
statMask the mask indicating the infos we want to update

Implements VCF::FilePeer.


The documentation for this class was generated from the following file:
   Comments or Suggestions?    License Information