|
Apache Log4cxx
Version 1.6.0
|
An abstract representation of file and directory path names. More...
#include <file.h>
Public Member Functions | |
| File () | |
| Construct a new instance. | |
| File (const char *path) | |
| Construct a new instance. | |
| File (const std::string &path) | |
| Construct a new instance. | |
| File (const wchar_t *path) | |
| Construct a new instance. | |
| File (const std::wstring &path) | |
| Construct a new instance. | |
| File (const UniChar *path) | |
| Construct a new instance. | |
| File (const std::basic_string< UniChar > &path) | |
| Construct a new instance. | |
| File (const CFStringRef &path) | |
| Construct a new instance. | |
| File (const File &src) | |
| Copy constructor. | |
| File & | operator= (const File &src) |
| Assignment operator. | |
| ~File () | |
| Destructor. | |
| bool | exists (log4cxx::helpers::Pool &p) const |
| Determines if file exists. | |
| size_t | length (log4cxx::helpers::Pool &p) const |
| Determines length of file. | |
| log4cxx_time_t | lastModified (log4cxx::helpers::Pool &p) const |
| Determines last modification date. | |
| LogString | getName () const |
| Get final portion of file path. | |
| LogString | getPath () const |
| Get file path. | |
| File & | setPath (const LogString &) |
| Set file path. | |
| log4cxx_status_t | open (apr_file_t **file, int flags, int perm, log4cxx::helpers::Pool &p) const |
| Open file. | |
| std::vector< LogString > | list (log4cxx::helpers::Pool &p) const |
| List files if current file is a directory. | |
| bool | deleteFile (log4cxx::helpers::Pool &p) const |
| Delete file. | |
| bool | renameTo (const File &dest, log4cxx::helpers::Pool &p) const |
| Rename file. | |
| LogString | getParent (log4cxx::helpers::Pool &p) const |
| Get path of parent directory. | |
| bool | mkdirs (log4cxx::helpers::Pool &p) const |
| Make directories recursively. | |
| void | setAutoDelete (bool autoDelete) |
| Set the file to be deleted when this object is destroyed. | |
| bool | getAutoDelete () const |
| Return the value of the autodelete setting. | |
An abstract representation of file and directory path names.
| log4cxx::File::File | ( | ) |
Construct a new instance.
| log4cxx::File::File | ( | const char * | path | ) |
Construct a new instance.
Use setPath to specify path using a LogString.
| path | file path in local encoding. |
| log4cxx::File::File | ( | const std::string & | path | ) |
Construct a new instance.
Use setPath to specify path using a LogString.
| path | file path in current encoding. |
| log4cxx::File::File | ( | const wchar_t * | path | ) |
| log4cxx::File::File | ( | const std::wstring & | path | ) |
| log4cxx::File::File | ( | const UniChar * | path | ) |
| log4cxx::File::File | ( | const std::basic_string< UniChar > & | path | ) |
| log4cxx::File::File | ( | const CFStringRef & | path | ) |
| log4cxx::File::File | ( | const File & | src | ) |
Copy constructor.
| log4cxx::File::~File | ( | ) |
Destructor.
| bool log4cxx::File::deleteFile | ( | log4cxx::helpers::Pool & | p | ) | const |
Delete file.
| p | pool. |
| bool log4cxx::File::exists | ( | log4cxx::helpers::Pool & | p | ) | const |
Determines if file exists.
| p | pool. |
| bool log4cxx::File::getAutoDelete | ( | ) | const |
Return the value of the autodelete setting.
If true, this file will be deleted when the destructor is called.
| LogString log4cxx::File::getName | ( | ) | const |
Get final portion of file path.
| LogString log4cxx::File::getParent | ( | log4cxx::helpers::Pool & | p | ) | const |
Get path of parent directory.
| p | pool. |
| LogString log4cxx::File::getPath | ( | ) | const |
| log4cxx_time_t log4cxx::File::lastModified | ( | log4cxx::helpers::Pool & | p | ) | const |
Determines last modification date.
| p | pool. |
| size_t log4cxx::File::length | ( | log4cxx::helpers::Pool & | p | ) | const |
Determines length of file.
May not be accurate if file is current open.
| p | pool. |
| std::vector< LogString > log4cxx::File::list | ( | log4cxx::helpers::Pool & | p | ) | const |
List files if current file is a directory.
| p | pool. |
| bool log4cxx::File::mkdirs | ( | log4cxx::helpers::Pool & | p | ) | const |
Make directories recursively.
| p | pool. |
| log4cxx_status_t log4cxx::File::open | ( | apr_file_t ** | file, |
| int | flags, | ||
| int | perm, | ||
| log4cxx::helpers::Pool & | p ) const |
Open file.
See apr_file_open for details.
| file | APR file handle. |
| flags | flags. |
| perm | permissions. |
| p | pool. |
| bool log4cxx::File::renameTo | ( | const File & | dest, |
| log4cxx::helpers::Pool & | p ) const |
Rename file.
| dest | new path for file. |
| p | pool. |
| void log4cxx::File::setAutoDelete | ( | bool | autoDelete | ) |
Set the file to be deleted when this object is destroyed.
| autoDelete | If true, delete file upon destruction. If true, do not delete file. |