cppfs  1.2.0.5b71c2c98fb9
Cross-platform C++ file system library supporting multiple backends (Local-FS, SSH)
Public Member Functions | List of all members
cppfs::AbstractFileIteratorBackend Class Referenceabstract

Interface for iterating on directories. More...

#include <cppfs/include/cppfs/AbstractFileIteratorBackend.h>

Inheritance diagram for cppfs::AbstractFileIteratorBackend:
Inheritance graph
[legend]

Public Member Functions

 AbstractFileIteratorBackend ()
 Constructor. More...
 
virtual ~AbstractFileIteratorBackend ()
 Destructor. More...
 
virtual std::unique_ptr< AbstractFileIteratorBackendclone () const =0
 Create a copy of this iterator. More...
 
virtual AbstractFileSystemfs () const =0
 Get file system. More...
 
virtual bool valid () const =0
 Check if iterator points to a valid item. More...
 
virtual std::string path () const =0
 Get path in file system on which the iterator operates. More...
 
virtual int index () const =0
 Get current index of iterator in the directory. More...
 
virtual std::string name () const =0
 Get name of current directory item. More...
 
virtual void next ()=0
 Advance to the next item. More...
 

Detailed Description

Interface for iterating on directories.

Constructor & Destructor Documentation

cppfs::AbstractFileIteratorBackend::AbstractFileIteratorBackend ( )

Constructor.

virtual cppfs::AbstractFileIteratorBackend::~AbstractFileIteratorBackend ( )
virtual

Destructor.

Member Function Documentation

virtual std::unique_ptr<AbstractFileIteratorBackend> cppfs::AbstractFileIteratorBackend::clone ( ) const
pure virtual

Create a copy of this iterator.

Returns
File iterator

Implemented in cppfs::LocalFileIterator, cppfs::SshFileIterator, and cppfs::LocalFileIterator.

virtual AbstractFileSystem* cppfs::AbstractFileIteratorBackend::fs ( ) const
pure virtual

Get file system.

Returns
File system (must NOT be null)

Implemented in cppfs::LocalFileIterator, cppfs::SshFileIterator, and cppfs::LocalFileIterator.

virtual bool cppfs::AbstractFileIteratorBackend::valid ( ) const
pure virtual

Check if iterator points to a valid item.

Returns
'true' if valid, else 'false'

Implemented in cppfs::LocalFileIterator, cppfs::SshFileIterator, and cppfs::LocalFileIterator.

virtual std::string cppfs::AbstractFileIteratorBackend::path ( ) const
pure virtual

Get path in file system on which the iterator operates.

Returns
Path

Implemented in cppfs::LocalFileIterator, cppfs::SshFileIterator, and cppfs::LocalFileIterator.

virtual int cppfs::AbstractFileIteratorBackend::index ( ) const
pure virtual

Get current index of iterator in the directory.

Returns
Index, -1 if invalid

Implemented in cppfs::LocalFileIterator, cppfs::SshFileIterator, and cppfs::LocalFileIterator.

virtual std::string cppfs::AbstractFileIteratorBackend::name ( ) const
pure virtual

Get name of current directory item.

Returns
File name

Implemented in cppfs::LocalFileIterator, cppfs::SshFileIterator, and cppfs::LocalFileIterator.

virtual void cppfs::AbstractFileIteratorBackend::next ( )
pure virtual

Advance to the next item.

Implemented in cppfs::LocalFileIterator, cppfs::SshFileIterator, and cppfs::LocalFileIterator.


The documentation for this class was generated from the following file: