cppfs
1.2.0.5b71c2c98fb9
Cross-platform C++ file system library supporting multiple backends (Local-FS, SSH)
|
Interface for file handles. More...
#include <cppfs/include/cppfs/AbstractFileHandleBackend.h>
Public Member Functions | |
AbstractFileHandleBackend () | |
Constructor. More... | |
virtual | ~AbstractFileHandleBackend () |
Destructor. More... | |
virtual std::unique_ptr< AbstractFileHandleBackend > | clone () const =0 |
Create a copy of this handle. More... | |
virtual AbstractFileSystem * | fs () const =0 |
Get file system. More... | |
virtual void | updateFileInfo ()=0 |
Update file information. More... | |
virtual std::string | path () const =0 |
Get path. More... | |
virtual bool | exists () const =0 |
Check if file or directory exists. More... | |
virtual bool | isFile () const =0 |
Check if item is a file. More... | |
virtual bool | isDirectory () const =0 |
Check if item is a directory. More... | |
virtual bool | isSymbolicLink () const =0 |
Check if item is a symbolic link. More... | |
virtual std::vector< std::string > | listFiles () const =0 |
List files in directory. More... | |
virtual std::unique_ptr< AbstractFileIteratorBackend > | begin () const =0 |
Get iterator that points to the first directory entry. More... | |
virtual unsigned int | size () const =0 |
Get file size. More... | |
virtual unsigned int | accessTime () const =0 |
Get time of last access. More... | |
virtual unsigned int | modificationTime () const =0 |
Get time of last modification. More... | |
virtual unsigned int | userId () const =0 |
Get ID of owning user. More... | |
virtual void | setUserId (unsigned int uid)=0 |
Set owning user. More... | |
virtual unsigned int | groupId () const =0 |
Get ID of owning group. More... | |
virtual void | setGroupId (unsigned int gid)=0 |
Set owning group. More... | |
virtual unsigned long | permissions () const =0 |
Get file permissions. More... | |
virtual void | setPermissions (unsigned long permissions)=0 |
Set file permissions. More... | |
virtual bool | createDirectory ()=0 |
Create directory. More... | |
virtual bool | removeDirectory ()=0 |
Remove directory. More... | |
virtual bool | copy (AbstractFileHandleBackend &dest)=0 |
Copy file. More... | |
virtual bool | move (AbstractFileHandleBackend &dest)=0 |
Move file. More... | |
virtual bool | createLink (AbstractFileHandleBackend &dest)=0 |
Create hard link. More... | |
virtual bool | createSymbolicLink (AbstractFileHandleBackend &dest)=0 |
Create symbolic link. More... | |
virtual bool | rename (const std::string &filename)=0 |
Rename file or directory. More... | |
virtual bool | remove ()=0 |
Remove file. More... | |
virtual std::unique_ptr< std::istream > | createInputStream (std::ios_base::openmode mode) const =0 |
Create input stream to read from the file. More... | |
virtual std::unique_ptr< std::ostream > | createOutputStream (std::ios_base::openmode mode)=0 |
Create output stream to write to the file. More... | |
Interface for file handles.
cppfs::AbstractFileHandleBackend::AbstractFileHandleBackend | ( | ) |
Constructor.
|
virtual |
Destructor.
|
pure virtual |
Create a copy of this handle.
Implemented in cppfs::LocalFileHandle, cppfs::SshFileHandle, and cppfs::LocalFileHandle.
|
pure virtual |
Get file system.
Implemented in cppfs::LocalFileHandle, cppfs::SshFileHandle, and cppfs::LocalFileHandle.
|
pure virtual |
Update file information.
Implemented in cppfs::LocalFileHandle, cppfs::SshFileHandle, and cppfs::LocalFileHandle.
|
pure virtual |
Get path.
Implemented in cppfs::LocalFileHandle, cppfs::SshFileHandle, and cppfs::LocalFileHandle.
|
pure virtual |
Check if file or directory exists.
Implemented in cppfs::LocalFileHandle, cppfs::SshFileHandle, and cppfs::LocalFileHandle.
|
pure virtual |
Check if item is a file.
Implemented in cppfs::LocalFileHandle, cppfs::SshFileHandle, and cppfs::LocalFileHandle.
|
pure virtual |
Check if item is a directory.
Implemented in cppfs::LocalFileHandle, cppfs::SshFileHandle, and cppfs::LocalFileHandle.
|
pure virtual |
Check if item is a symbolic link.
Implemented in cppfs::LocalFileHandle, cppfs::SshFileHandle, and cppfs::LocalFileHandle.
|
pure virtual |
List files in directory.
Implemented in cppfs::LocalFileHandle, cppfs::SshFileHandle, and cppfs::LocalFileHandle.
|
pure virtual |
Get iterator that points to the first directory entry.
Implemented in cppfs::LocalFileHandle, cppfs::SshFileHandle, and cppfs::LocalFileHandle.
|
pure virtual |
Get file size.
Implemented in cppfs::LocalFileHandle, cppfs::SshFileHandle, and cppfs::LocalFileHandle.
|
pure virtual |
Get time of last access.
Implemented in cppfs::LocalFileHandle, cppfs::SshFileHandle, and cppfs::LocalFileHandle.
|
pure virtual |
Get time of last modification.
Implemented in cppfs::LocalFileHandle, cppfs::SshFileHandle, and cppfs::LocalFileHandle.
|
pure virtual |
Get ID of owning user.
Implemented in cppfs::LocalFileHandle, cppfs::SshFileHandle, and cppfs::LocalFileHandle.
|
pure virtual |
Set owning user.
[in] | uid | User ID |
Implemented in cppfs::LocalFileHandle, cppfs::SshFileHandle, and cppfs::LocalFileHandle.
|
pure virtual |
Get ID of owning group.
Implemented in cppfs::LocalFileHandle, cppfs::SshFileHandle, and cppfs::LocalFileHandle.
|
pure virtual |
Set owning group.
[in] | gid | Group ID |
Implemented in cppfs::LocalFileHandle, cppfs::SshFileHandle, and cppfs::LocalFileHandle.
|
pure virtual |
Get file permissions.
Implemented in cppfs::LocalFileHandle, cppfs::SshFileHandle, and cppfs::LocalFileHandle.
|
pure virtual |
Set file permissions.
[in] | permissions | File permissions |
Implemented in cppfs::LocalFileHandle, cppfs::SshFileHandle, and cppfs::LocalFileHandle.
|
pure virtual |
Create directory.
Implemented in cppfs::LocalFileHandle, cppfs::SshFileHandle, and cppfs::LocalFileHandle.
|
pure virtual |
Remove directory.
Implemented in cppfs::LocalFileHandle, cppfs::SshFileHandle, and cppfs::LocalFileHandle.
|
pure virtual |
Copy file.
[in] | dest | Destination file or directory (must be of the same type as this file handle) |
Implemented in cppfs::LocalFileHandle, cppfs::SshFileHandle, and cppfs::LocalFileHandle.
|
pure virtual |
Move file.
[in] | dest | Destination file or directory (must be of the same type as this file handle) |
Implemented in cppfs::LocalFileHandle, cppfs::SshFileHandle, and cppfs::LocalFileHandle.
|
pure virtual |
Create hard link.
[in] | dest | Destination file or directory (must be of the same type as this file handle) |
Implemented in cppfs::LocalFileHandle, cppfs::SshFileHandle, and cppfs::LocalFileHandle.
|
pure virtual |
Create symbolic link.
[in] | dest | Destination file or directory (must be of the same type as this file handle) |
Implemented in cppfs::LocalFileHandle, cppfs::SshFileHandle, and cppfs::LocalFileHandle.
|
pure virtual |
Rename file or directory.
[in] | filename | File name |
Implemented in cppfs::LocalFileHandle, cppfs::SshFileHandle, and cppfs::LocalFileHandle.
|
pure virtual |
Remove file.
Implemented in cppfs::LocalFileHandle, cppfs::SshFileHandle, and cppfs::LocalFileHandle.
|
pure virtual |
Create input stream to read from the file.
[in] | mode | Opening mode flags |
Implemented in cppfs::LocalFileHandle, cppfs::SshFileHandle, and cppfs::LocalFileHandle.
|
pure virtual |
Create output stream to write to the file.
[in] | mode | Opening mode flags |
Implemented in cppfs::LocalFileHandle, cppfs::SshFileHandle, and cppfs::LocalFileHandle.