Stroika Library
3.0d16
Help-Home
Loading...
Searching...
No Matches
DirectoryIterator.h
Go to the documentation of this file.
1
/*
2
* Copyright(c) Sophist Solutions, Inc. 1990-2025. All rights reserved
3
*/
4
#ifndef _Stroika_Foundation_IO_FileSystem_DirectoryIterator_h_
5
#define _Stroika_Foundation_IO_FileSystem_DirectoryIterator_h_ 1
6
7
#include "Stroika/Foundation/StroikaPreComp.h"
8
9
#include "
Stroika/Foundation/Characters/String.h
"
10
#include "Stroika/Foundation/Common/Common.h"
11
#include "
Stroika/Foundation/Common/Enumeration.h
"
12
#include "
Stroika/Foundation/Traversal/Iterator.h
"
13
14
#include "
Common.h
"
15
16
/**
17
* \file
18
*
19
* \note Code-Status: <a href="Code-Status.md#Beta">Beta</a>
20
*/
21
22
namespace
Stroika::Foundation::IO::FileSystem
{
23
24
using
Characters::String;
25
26
/**
27
* This iterator returns the file names contained in the given argument directory.
28
* See @todo.
29
*
30
* See @DirectoryIterable
31
*
32
* \note DirectoryIterable will NOT return the special values '.' and '..' which would be returned from readdir
33
*
34
* \note \em Thread-Safety <a href="Thread-Safety.md#C++-Standard-Thread-Safety">C++-Standard-Thread-Safety</a>
35
*
36
* \note PROBBALY GOING TO DEPRECATE IN FAVOR OF https://en.cppreference.com/w/cpp/filesystem/directory_iterator -- LGP 2020-06-29
37
*/
38
class
DirectoryIterator
:
public
Traversal::Iterator
<filesystem::path> {
39
public
:
40
/**
41
*/
42
enum class
IteratorReturnType {
43
eFilenameOnly,
44
eDirPlusFilename,
// argument directory + pathname (so can be relative)
45
eFullPathName,
46
47
eDEFAULT = eFilenameOnly,
48
49
Stroika_Define_Enum_Bounds
(eFilenameOnly, eFullPathName)
50
};
51
52
public
:
53
/**
54
*/
55
DirectoryIterator
(
const
filesystem::path& directory, IteratorReturnType iteratorReturns = IteratorReturnType::eDEFAULT);
56
57
private
:
58
class
Rep_;
59
};
60
61
}
62
63
/*
64
********************************************************************************
65
***************************** Implementation Details ***************************
66
********************************************************************************
67
*/
68
#include "DirectoryIterator.inl"
69
70
#endif
/*_Stroika_Foundation_IO_FileSystem_DirectoryIterator_h_*/
Enumeration.h
Stroika_Define_Enum_Bounds
#define Stroika_Define_Enum_Bounds(FIRST_ITEM, LAST_ITEM)
Definition
Enumeration.h:109
Common.h
Iterator.h
String.h
Stroika::Foundation::IO::FileSystem::DirectoryIterator
Definition
DirectoryIterator.h:38
Stroika::Foundation::Traversal::Iterator
An Iterator<T> is a copyable object which allows traversing the contents of some container....
Definition
Iterator.h:225
Stroika::Foundation::IO::FileSystem
Definition
Foundation/IO/FileSystem/Common.h:18
Library
Sources
Stroika
Foundation
IO
FileSystem
DirectoryIterator.h
Generated by
1.9.8