Logo Search packages:      
Sourcecode: poco version File versions  Download package

Poco::File Class Reference

#include <File.h>

Inheritance diagram for Poco::File:

Poco::TemporaryFile

List of all members.


Detailed Description

The File class provides methods for working with a file.

Definition at line 65 of file File.h.


Public Types

typedef FileSizeImpl FileSize

Public Member Functions

bool canRead () const
 Returns true iff the file exists.
bool canWrite () const
 Returns true iff the file is readable.
void copyTo (const std::string &path) const
Timestamp created () const
 Returns true iff the file is a directory.
void createDirectories ()
bool createDirectory ()
bool createFile ()
bool exists () const
 Returns the path.
 File (const File &file)
 Creates the file.
 File (const Path &path)
 Creates the file.
 File (const char *path)
 Creates the file.
 File (const std::string &path)
 Creates the file.
Timestamp getLastModified () const
 Returns the creation date of the file.
FileSize getSize () const
 Sets the modification date of the file.
bool isDirectory () const
 Returns true iff the file is a symbolic link.
bool isFile () const
 Returns true iff the file is writeable.
bool isLink () const
 Returns true iff the file is a regular file.
void list (std::vector< File > &files) const
void list (std::vector< std::string > &files) const
void moveTo (const std::string &path)
bool operator!= (const File &file) const
bool operator< (const File &file) const
bool operator<= (const File &file) const
Fileoperator= (const Path &path)
 Assignment operator.
Fileoperator= (const char *path)
 Assignment operator.
Fileoperator= (const std::string &path)
 Assignment operator.
Fileoperator= (const File &file)
 Destroys the file.
bool operator== (const File &file) const
bool operator> (const File &file) const
bool operator>= (const File &file) const
const std::string & path () const
 Swaps the file with another one.
void remove (bool recursive=false)
 Renames the file to the new name.
void renameTo (const std::string &path)
void setLastModified (const Timestamp &ts)
 Returns the modification date of the file.
void setReadOnly (bool flag=true)
void setSize (FileSize size)
 Returns the size of the file in bytes.
void setWriteable (bool flag=true)
void swap (File &file)
 Assignment operator.
virtual ~File ()
 Copy constructor.

Private Types

typedef UInt64 FileSizeImpl
typedef UInt64 FileSizeImpl
typedef UInt64 FileSizeImpl
typedef UInt64 FileSizeImpl

Private Member Functions

bool canReadImpl () const
bool canReadImpl () const
bool canReadImpl () const
bool canReadImpl () const
bool canWriteImpl () const
bool canWriteImpl () const
bool canWriteImpl () const
bool canWriteImpl () const
void copyToImpl (const std::string &path) const
void copyToImpl (const std::string &path) const
void copyToImpl (const std::string &path) const
void copyToImpl (const std::string &path) const
Timestamp createdImpl () const
Timestamp createdImpl () const
Timestamp createdImpl () const
Timestamp createdImpl () const
bool createDirectoryImpl ()
bool createDirectoryImpl ()
bool createDirectoryImpl ()
bool createDirectoryImpl ()
bool createFileImpl ()
bool createFileImpl ()
bool createFileImpl ()
bool createFileImpl ()
bool existsImpl () const
bool existsImpl () const
bool existsImpl () const
bool existsImpl () const
Timestamp getLastModifiedImpl () const
Timestamp getLastModifiedImpl () const
Timestamp getLastModifiedImpl () const
Timestamp getLastModifiedImpl () const
const std::string & getPathImpl () const
const std::string & getPathImpl () const
const std::string & getPathImpl () const
const std::string & getPathImpl () const
FileSizeImpl getSizeImpl () const
FileSizeImpl getSizeImpl () const
FileSizeImpl getSizeImpl () const
FileSizeImpl getSizeImpl () const
bool isDirectoryImpl () const
bool isDirectoryImpl () const
bool isDirectoryImpl () const
bool isDirectoryImpl () const
bool isFileImpl () const
bool isFileImpl () const
bool isFileImpl () const
bool isFileImpl () const
bool isLinkImpl () const
bool isLinkImpl () const
bool isLinkImpl () const
bool isLinkImpl () const
void removeImpl ()
void removeImpl ()
void removeImpl ()
void removeImpl ()
void renameToImpl (const std::string &path)
void renameToImpl (const std::string &path)
void renameToImpl (const std::string &path)
void renameToImpl (const std::string &path)
void setLastModifiedImpl (const Timestamp &ts)
void setLastModifiedImpl (const Timestamp &ts)
void setLastModifiedImpl (const Timestamp &ts)
void setLastModifiedImpl (const Timestamp &ts)
void setPath (const std::string &path)
void setPathImpl (const std::string &path)
void setPathImpl (const std::string &path)
void setPathImpl (const std::string &path)
void setPathImpl (const std::string &path)
void setSizeImpl (FileSizeImpl size)
void setSizeImpl (FileSizeImpl size)
void setSizeImpl (FileSizeImpl size)
void setSizeImpl (FileSizeImpl size)
void setWriteableImpl (bool flag=true)
void setWriteableImpl (bool flag=true)
void setWriteableImpl (bool flag=true)
void setWriteableImpl (bool flag=true)
void swapImpl (FileImpl &file)
void swapImpl (FileImpl &file)
void swapImpl (FileImpl &file)
void swapImpl (FileImpl &file)

Static Private Member Functions

static void handleError (const std::string &path)
static void handleError (const std::string &path)
static void handleError (const std::string &path)
static void handleError (const std::string &path)

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

Generated by  Doxygen 1.6.0   Back to index