Stroika Library
3.0d16
Help-Home
Loading...
Searching...
No Matches
DirectoryIterable.h
1
/*
2
* Copyright(c) Sophist Solutions, Inc. 1990-2025. All rights reserved
3
*/
4
#ifndef _Stroika_Foundation_IO_FileSystem_DirectoryIterable_h_
5
#define _Stroika_Foundation_IO_FileSystem_DirectoryIterable_h_ 1
6
7
#include "Stroika/Foundation/StroikaPreComp.h"
8
9
#include <filesystem>
10
11
#include "
Stroika/Foundation/Characters/String.h
"
12
#include "Stroika/Foundation/Common/Common.h"
13
#include "
Stroika/Foundation/Traversal/Iterable.h
"
14
15
#include "
Stroika/Foundation/IO/FileSystem/DirectoryIterator.h
"
16
17
/**
18
* TODO:
19
*
20
* \note Code-Status: <a href="Code-Status.md#Beta">Beta</a>
21
*
22
*/
23
24
namespace
Stroika::Foundation::IO::FileSystem
{
25
26
using
Characters::String;
27
28
/**
29
* This iterable returns the file names contained in the given argument directory.
30
* See @todo.
31
*
32
* See @DirectoryIterator
33
*
34
* \note DirectoryIterable will NOT return the special values '.' and '..' which would be returned from readdir
35
*
36
* \par Example Usage
37
* \code
38
* Iterable<String> textFilesInSlashTmp = DirectoryIterable ("/tmp").Where ([] (const String& i) { return i.EndsWith (".txt"); });
39
* \endcode
40
*
41
* \note \em Thread-Safety <a href="Thread-Safety.md#C++-Standard-Thread-Safety-For-Envelope-Plus-Must-Externally-Synchronize-Letter">C++-Standard-Thread-Safety-For-Envelope-Plus-Must-Externally-Synchronize-Letter</a>
42
*/
43
class
DirectoryIterable
:
public
Traversal::Iterable
<filesystem::path> {
44
public
:
45
using
IteratorReturnType = DirectoryIterator::IteratorReturnType;
46
47
public
:
48
/**
49
*/
50
DirectoryIterable
(
const
filesystem::path& directory, IteratorReturnType iteratorReturns = IteratorReturnType::eDEFAULT);
51
};
52
53
}
54
55
/*
56
********************************************************************************
57
***************************** Implementation Details ***************************
58
********************************************************************************
59
*/
60
#include "DirectoryIterable.inl"
61
62
#endif
/*_Stroika_Foundation_IO_FileSystem_DirectoryIterable_h_*/
DirectoryIterator.h
Iterable.h
String.h
Stroika::Foundation::IO::FileSystem::DirectoryIterable
Definition
DirectoryIterable.h:43
Stroika::Foundation::Traversal::Iterable
Iterable<T> is a base class for containers which easily produce an Iterator<T> to traverse them.
Definition
Iterable.h:237
Stroika::Foundation::IO::FileSystem
Definition
Foundation/IO/FileSystem/Common.h:18
Library
Sources
Stroika
Foundation
IO
FileSystem
DirectoryIterable.h
Generated by
1.9.8