Namespaces | |
| namespace | Path |
Functions | |
| File | openFile (const String &path) |
| Open a file for read/write and return an File object that can be used for reading and writing. | |
| File | createFile (const String &path) |
| Create the file for the given name. | |
| File | openOrCreateFile (const String &path) |
| Opens or creates the file for the given name. | |
| int | changeFileOwner (const String &filename, const UserId &userId) |
| Change the given file ownership. | |
| bool | exists (const String &path) |
| bool | isExecutable (const String &path) |
| bool | canRead (const String &path) |
| bool | canWrite (const String &path) |
| bool | isLink (const String &path) |
| bool | isDirectory (const String &path) |
| bool | changeDirectory (const String &path) |
| Change to the given directory. | |
| bool | makeDirectory (const String &path, int mode=0777) |
| Create a directory. | |
| bool | getFileSize (const String &path, off_t &size) |
| Get the size of the file in bytes. | |
| bool | removeDirectory (const String &path) |
| Remove the given directory. | |
| bool | removeFile (const String &path) |
| Remove the given file. | |
| bool | getDirectoryContents (const String &path, StringArray &dirEntries) |
| Get the names of the files (and directories) in the given directory. | |
| bool | renameFile (const String &oldFileName, const String &newFileName) |
| Rename the given file to the new name. | |
| size_t | read (const FileHandle &hdl, void *bfr, size_t numberOfBytes, off_t offset=-1L) |
| Read data from file. | |
| size_t | write (FileHandle &hdl, const void *bfr, size_t numberOfBytes, off_t offset=-1L) |
| Write data to a file. | |
| off_t | seek (const FileHandle &hdl, off_t offset, int whence) |
| Seek to a given offset within the file. | |
| off_t | tell (const FileHandle &hdl) |
| void | rewind (const FileHandle &hdl) |
| Position the file pointer associated with the given file handle to the beginning of the file. | |
| int | close (const FileHandle &hdl) |
| Close file handle. | |
| int | flush (FileHandle &hdl) |
| Flush any buffered data to the file if buffering supported. | |
| String | getFileContents (const String &filename) |
| Read and return the contents of a text file. | |
| StringArray | getFileLines (const String &filename) |
| Read and return the lines of a test file. | |
| String | readSymbolicLink (const String &path) |
| Read the value of a symbolic link. | |
| void | initRandomFile (const String &filename) |
|
|
Definition at line 182 of file PosixFileSystem.cpp. References _ACCESS, and BLOCXX_NAMESPACE::String::c_str(). Referenced by BLOCXX_NAMESPACE::dlSharedLibrary::isFakeLibrary(). |
|
|
Definition at line 188 of file PosixFileSystem.cpp. References _ACCESS, and BLOCXX_NAMESPACE::String::c_str(). |
|
|
Change to the given directory.
Definition at line 237 of file PosixFileSystem.cpp. References _CHDIR, and BLOCXX_NAMESPACE::String::c_str(). |
|
||||||||||||
|
Change the given file ownership.
Definition at line 108 of file PosixFileSystem.cpp. References BLOCXX_NAMESPACE::String::c_str(). |
|
|
Close file handle.
Definition at line 430 of file PosixFileSystem.cpp. Referenced by BLOCXX_NAMESPACE::File::close(), BLOCXX_NAMESPACE::closeFile(), BLOCXX_NAMESPACE::SocketBaseImpl::connect(), BLOCXX_NAMESPACE::SocketBaseImpl::disconnect(), initRandomFile(), BLOCXX_NAMESPACE::NwIface::NwIface(), BLOCXX_NAMESPACE::Exec::safePopen(), BLOCXX_NAMESPACE::Select::selectRWEpoll(), and BLOCXX_NAMESPACE::File::~File(). |
|
|
Create the file for the given name.
Definition at line 135 of file PosixFileSystem.cpp. References BLOCXX_NAMESPACE::String::c_str(). |
|
|
Definition at line 169 of file PosixFileSystem.cpp. References _ACCESS, and BLOCXX_NAMESPACE::String::c_str(). Referenced by BLOCXX_NAMESPACE::ServerSocketImpl::doListen(), and BLOCXX_NAMESPACE::FileAppender::doProcessLogMessage(). |
|
|
Flush any buffered data to the file if buffering supported.
Definition at line 440 of file PosixFileSystem.cpp. Referenced by BLOCXX_NAMESPACE::File::flush(), and BLOCXX_NAMESPACE::StackTrace::printStackTrace(). |
|
||||||||||||
|
Get the names of the files (and directories) in the given directory.
Definition at line 281 of file PosixFileSystem.cpp. References BLOCXX_NAMESPACE::Array< T >::append(), BLOCXX_FILENAME_SEPARATOR, BLOCXX_NAMESPACE::String::c_str(), BLOCXX_NAMESPACE::Array< T >::clear(), and BLOCXX_NAMESPACE::String::endsWith(). |
|
|
Read and return the contents of a text file. If the file contains a null character ('\0') then only previous data will be returned.
Definition at line 498 of file PosixFileSystem.cpp. References BLOCXX_THROW, BLOCXX_NAMESPACE::String::c_str(), and BLOCXX_NAMESPACE::OStringStream::toString(). Referenced by getFileLines(). |
|
|
Read and return the lines of a test file. If the file contains a null character ('\0') then only previous data will be returned.
Definition at line 511 of file PosixFileSystem.cpp. References getFileContents(), and BLOCXX_NAMESPACE::String::tokenize(). |
|
||||||||||||
|
Get the size of the file in bytes.
Definition at line 249 of file PosixFileSystem.cpp. References BLOCXX_NAMESPACE::String::c_str(). |
|
|
Definition at line 454 of file PosixFileSystem.cpp. References BLOCXX_THROW, BLOCXX_NAMESPACE::String::c_str(), close(), BLOCXX_NAMESPACE::RandomNumber::getNextNumber(), i, and write(). |
|
|
Definition at line 217 of file PosixFileSystem.cpp. References BLOCXX_NAMESPACE::String::c_str(). |
|
|
Definition at line 175 of file PosixFileSystem.cpp. References _ACCESS, and BLOCXX_NAMESPACE::String::c_str(). |
|
|
Definition at line 194 of file PosixFileSystem.cpp. References BLOCXX_NAMESPACE::String::c_str(). |
|
||||||||||||
|
Create a directory.
Definition at line 243 of file PosixFileSystem.cpp. References _MKDIR, and BLOCXX_NAMESPACE::String::c_str(). |
|
|
Open a file for read/write and return an File object that can be used for reading and writing.
Definition at line 120 of file PosixFileSystem.cpp. References BLOCXX_NAMESPACE::String::c_str(). Referenced by BLOCXX_NAMESPACE::dlSharedLibrary::isFakeLibrary(), and BLOCXX_NAMESPACE::TempFileEnumerationImplBase::readSize(). |
|
|
Opens or creates the file for the given name.
Definition at line 155 of file PosixFileSystem.cpp. References BLOCXX_NAMESPACE::String::c_str(). Referenced by BLOCXX_NAMESPACE::ServerSocketImpl::doListen(). |
|
||||||||||||||||||||
|
Read data from file.
Definition at line 333 of file PosixFileSystem.cpp. References BLOCXX_NAMESPACE::BinarySerialization::read(). |
|
|
Read the value of a symbolic link.
Definition at line 517 of file PosixFileSystem.cpp. References BLOCXX_THROW_ERRNO, BLOCXX_NAMESPACE::String::c_str(), MAXPATHLEN, and BLOCXX_NAMESPACE::FileSystem::Path::realPath(). Referenced by BLOCXX_NAMESPACE::FileSystem::Path::realPath(). |
|
|
Remove the given directory.
Definition at line 269 of file PosixFileSystem.cpp. References _RMDIR, and BLOCXX_NAMESPACE::String::c_str(). |
|
|
Remove the given file.
Definition at line 275 of file PosixFileSystem.cpp. References _UNLINK, and BLOCXX_NAMESPACE::String::c_str(). Referenced by BLOCXX_NAMESPACE::ServerSocketImpl::close(), BLOCXX_NAMESPACE::ServerSocketImpl::doListen(), and BLOCXX_NAMESPACE::FileAppender::doProcessLogMessage(). |
|
||||||||||||
|
Rename the given file to the new name.
Definition at line 326 of file PosixFileSystem.cpp. References BLOCXX_NAMESPACE::String::c_str(). Referenced by BLOCXX_NAMESPACE::FileAppender::doProcessLogMessage(). |
|
|
Position the file pointer associated with the given file handle to the beginning of the file.
Definition at line 420 of file PosixFileSystem.cpp. Referenced by BLOCXX_NAMESPACE::File::rewind(). |
|
||||||||||||||||
|
Seek to a given offset within the file.
Definition at line 393 of file PosixFileSystem.cpp. Referenced by BLOCXX_NAMESPACE::File::seek(). |
|
|
Definition at line 410 of file PosixFileSystem.cpp. Referenced by BLOCXX_NAMESPACE::File::tell(). |
|
||||||||||||||||||||
|
Write data to a file.
Definition at line 363 of file PosixFileSystem.cpp. References BLOCXX_NAMESPACE::BinarySerialization::write(). Referenced by initRandomFile(). |
1.4.4