An abstract representation of file and directory path names.
More...
#include <file.h>
An abstract representation of file and directory path names.
- Examples
- com/foo/config3.cpp.
◆ File() [1/9]
Construct a new instance.
◆ File() [2/9]
log4cxx::File::File |
( |
const char * |
path | ) |
|
Construct a new instance.
Use setPath to specify path using a LogString.
- Parameters
-
path | file path in local encoding. |
◆ File() [3/9]
log4cxx::File::File |
( |
const std::string & |
path | ) |
|
Construct a new instance.
Use setPath to specify path using a LogString.
- Parameters
-
path | file path in current encoding. |
◆ File() [4/9]
log4cxx::File::File |
( |
const wchar_t * |
path | ) |
|
Construct a new instance.
Use setPath to specify path using a LogString.
- Parameters
-
◆ File() [5/9]
log4cxx::File::File |
( |
const std::wstring & |
path | ) |
|
Construct a new instance.
Use setPath to specify path using a LogString.
- Parameters
-
◆ File() [6/9]
log4cxx::File::File |
( |
const UniChar * |
path | ) |
|
Construct a new instance.
Use setPath to specify path using a LogString.
- Parameters
-
◆ File() [7/9]
log4cxx::File::File |
( |
const std::basic_string< UniChar > & |
path | ) |
|
Construct a new instance.
Use setPath to specify path using a LogString.
- Parameters
-
◆ File() [8/9]
Construct a new instance.
Use setPath to specify path using a LogString.
- Parameters
-
◆ File() [9/9]
log4cxx::File::File |
( |
const File & |
src | ) |
|
◆ ~File()
◆ deleteFile()
Delete file.
- Parameters
-
- Returns
- true if file successfully deleted.
◆ exists()
◆ getAutoDelete()
bool log4cxx::File::getAutoDelete |
( |
| ) |
const |
Return the value of the autodelete setting.
If true, this file will be deleted when the destructor is called.
- Returns
- True if the file is deleted upon destruction.
◆ getName()
Get final portion of file path.
- Returns
- file name.
◆ getParent()
Get path of parent directory.
- Parameters
-
- Returns
- path of parent directory.
◆ getPath()
◆ lastModified()
Determines last modification date.
- Parameters
-
- Returns
- length of file.
◆ length()
Determines length of file.
May not be accurate if file is current open.
- Parameters
-
- Returns
- length of file.
◆ list()
List files if current file is a directory.
- Parameters
-
- Returns
- list of files in this directory, operation of non-directory returns empty list.
◆ mkdirs()
Make directories recursively.
- Parameters
-
- Returns
- true if all requested directories existed or have been created.
◆ open()
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.
- Parameters
-
file | APR file handle. |
flags | flags. |
perm | permissions. |
p | pool. |
- Returns
- APR_SUCCESS if successful.
◆ operator=()
File & log4cxx::File::operator= |
( |
const File & |
src | ) |
|
◆ renameTo()
Rename file.
- Parameters
-
dest | new path for file. |
p | pool. |
- Returns
- true if file successfully renamed.
◆ setAutoDelete()
void log4cxx::File::setAutoDelete |
( |
bool |
autoDelete | ) |
|
Set the file to be deleted when this object is destroyed.
- Parameters
-
autoDelete | If true, delete file upon destruction. If true, do not delete file. |
◆ setPath()
The documentation for this class was generated from the following file: