cppfs
1.2.0.5b71c2c98fb9
Cross-platform C++ file system library supporting multiple backends (Local-FS, SSH)
|
File iterator for a remove file system accessed by SSH. More...
#include <cppfs/include/cppfs/ssh/SshFileIterator.h>
Public Member Functions | |
SshFileIterator (std::shared_ptr< SshFileSystem > fs, const std::string &path) | |
Constructor. More... | |
virtual | ~SshFileIterator () |
Destructor. More... | |
virtual std::unique_ptr< AbstractFileIteratorBackend > | clone () const override |
Create a copy of this iterator. More... | |
virtual AbstractFileSystem * | fs () const override |
Get file system. More... | |
virtual bool | valid () const override |
Check if iterator points to a valid item. More... | |
virtual std::string | path () const override |
Get path in file system on which the iterator operates. More... | |
virtual int | index () const override |
Get current index of iterator in the directory. More... | |
virtual std::string | name () const override |
Get name of current directory item. More... | |
virtual void | next () override |
Advance to the next item. More... | |
Public Member Functions inherited from cppfs::AbstractFileIteratorBackend | |
AbstractFileIteratorBackend () | |
Constructor. More... | |
virtual | ~AbstractFileIteratorBackend () |
Destructor. More... | |
Protected Member Functions | |
void | readNextEntry () |
Protected Attributes | |
std::shared_ptr< SshFileSystem > | m_fs |
File system that created this iterator. More... | |
std::string | m_path |
Path to file or directory. More... | |
LIBSSH2_SFTP_HANDLE * | m_dir |
Directory handle. More... | |
int | m_index |
Current entry index. More... | |
std::string | m_filename |
Current entry file name. More... | |
LIBSSH2_SFTP_ATTRIBUTES | m_attrs |
Current entry attributes. More... | |
File iterator for a remove file system accessed by SSH.
cppfs::SshFileIterator::SshFileIterator | ( | std::shared_ptr< SshFileSystem > | fs, |
const std::string & | path | ||
) |
Constructor.
[in] | fs | File system that created this iterator |
[in] | path | Path to file or directory |
|
virtual |
Destructor.
|
overridevirtual |
|
overridevirtual |
Get file system.
Implements cppfs::AbstractFileIteratorBackend.
|
overridevirtual |
Check if iterator points to a valid item.
Implements cppfs::AbstractFileIteratorBackend.
|
overridevirtual |
Get path in file system on which the iterator operates.
Implements cppfs::AbstractFileIteratorBackend.
|
overridevirtual |
Get current index of iterator in the directory.
Implements cppfs::AbstractFileIteratorBackend.
|
overridevirtual |
|
overridevirtual |
Advance to the next item.
Implements cppfs::AbstractFileIteratorBackend.
|
protected |
|
protected |
File system that created this iterator.
|
protected |
Path to file or directory.
|
protected |
Directory handle.
|
protected |
Current entry index.
|
protected |
Current entry file name.
|
protected |
Current entry attributes.