SPH
Public Member Functions | List of all members
FileSystem::DirectoryAdapter Class Reference

Object providing begin and end directory iterator for given directory path. More...

#include <FileSystem.h>

Inheritance diagram for FileSystem::DirectoryAdapter:
Noncopyable

Public Member Functions

 DirectoryAdapter (const Path &directory)
 Creates the directory adapter for given path. More...
 
 DirectoryAdapter (DirectoryAdapter &&other)
 
 ~DirectoryAdapter ()
 
DirectoryIterator begin () const
 Returns the directory iterator to the first entry in the directory. More...
 
DirectoryIterator end () const
 Returns the directory iterator to the one-past-last entry in the directory. More...
 
- Public Member Functions inherited from Noncopyable
 Noncopyable ()=default
 
 Noncopyable (const Noncopyable &)=delete
 
 Noncopyable (Noncopyable &&)=default
 
Noncopyableoperator= (const Noncopyable &)=delete
 
Noncopyableoperator= (Noncopyable &&)=default
 

Detailed Description

Object providing begin and end directory iterator for given directory path.

It allows to enumerate all files and subdirectories in given directory. The enumeration is not recursive; if needed, another DirectoryAdapter has to be created for all subdirectories. The enumeration skips directories '.' and '..'.

Definition at line 145 of file FileSystem.h.

Constructor & Destructor Documentation

◆ DirectoryAdapter() [1/2]

FileSystem::DirectoryAdapter::DirectoryAdapter ( const Path directory)

Creates the directory adapter for given path.

In case the directory does not exist or isn't accessible, any calls of begin or end function return null iterator; range-based for loop for the adapter will be therefore perform zero iterations.

Definition at line 310 of file FileSystem.cpp.

◆ DirectoryAdapter() [2/2]

FileSystem::DirectoryAdapter::DirectoryAdapter ( DirectoryAdapter &&  other)

Definition at line 325 of file FileSystem.cpp.

◆ ~DirectoryAdapter()

FileSystem::DirectoryAdapter::~DirectoryAdapter ( )

Definition at line 319 of file FileSystem.cpp.

Member Function Documentation

◆ begin()

FileSystem::DirectoryIterator FileSystem::DirectoryAdapter::begin ( ) const

Returns the directory iterator to the first entry in the directory.

The files in directory are enumerated in unspecified order.

Definition at line 330 of file FileSystem.cpp.

◆ end()

FileSystem::DirectoryIterator FileSystem::DirectoryAdapter::end ( ) const

Returns the directory iterator to the one-past-last entry in the directory.

Definition at line 334 of file FileSystem.cpp.


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