Sane C++ Libraries
C++ Platform Abstraction Libraries
Loading...
Searching...
No Matches
FileSystem Iterator

🟩 Allocation-free, pull-based directory traversal (see File System Iterator for more details) More...

Classes

struct  SC::FileSystemIterator
 Iterates files and directories inside a given path without allocating any memory. More...
 
struct  SC::ResultFileSystemIterator
 FileSystemIterator result retaining optional native, backend-stage, and directory-depth details. More...
 

Enumerations

enum class  SC::FileSystemIteratorError : uint32_t {
  NotInitialized = 1 ,
  InvalidRecursionState ,
  UnsupportedPathEncoding ,
  PathTooLong ,
  RecursionLimitExceeded ,
  PathResolutionFailed ,
  OpenDirectoryFailed ,
  DirectoryEnumerationFailed
}
 Stable error codes returned by the FileSystemIterator library. More...
 
enum class  SC::FileSystemIteratorErrorDetail : uint16_t {
  None = 0 ,
  WindowsResolveLogicalPath ,
  BuildPath ,
  PosixOpen ,
  PosixFdOpenDir ,
  WindowsFindFirstFile ,
  PushRecursionState ,
  PosixReadDir ,
  WindowsFindNextFile
}
 Stable detail identifying the backend stage of a FileSystemIterator failure. More...
 

Functions

ResultErrorFormat SC::formatFileSystemIteratorError (FileSystemIteratorError error, Span< char > output)
 Formats a canonical English FileSystemIterator diagnostic into caller-owned storage.
 
ResultErrorFormat SC::formatFileSystemIteratorError (Result result, Span< char > output)
 Formats a plain Result when it contains a FileSystemIterator error.
 
ResultErrorFormat SC::formatFileSystemIteratorError (ResultFileSystemIterator result, Span< char > output)
 Formats a FileSystemIterator result, including its fixed-size context when available.
 

Detailed Description

🟩 Allocation-free, pull-based directory traversal (see File System Iterator for more details)

Enumeration Type Documentation

◆ FileSystemIteratorError

enum class SC::FileSystemIteratorError : uint32_t
strong

#include <FileSystemIteratorError.h>

Stable error codes returned by the FileSystemIterator library.

◆ FileSystemIteratorErrorDetail

enum class SC::FileSystemIteratorErrorDetail : uint16_t
strong

#include <FileSystemIteratorError.h>

Stable detail identifying the backend stage of a FileSystemIterator failure.

Function Documentation

◆ formatFileSystemIteratorError() [1/3]

ResultErrorFormat SC::formatFileSystemIteratorError ( FileSystemIteratorError error,
Span< char > output )
inline

#include <FileSystemIteratorErrorFormatter.h>

Formats a canonical English FileSystemIterator diagnostic into caller-owned storage.

◆ formatFileSystemIteratorError() [2/3]

ResultErrorFormat SC::formatFileSystemIteratorError ( Result result,
Span< char > output )
inline

#include <FileSystemIteratorErrorFormatter.h>

Formats a plain Result when it contains a FileSystemIterator error.

◆ formatFileSystemIteratorError() [3/3]

ResultErrorFormat SC::formatFileSystemIteratorError ( ResultFileSystemIterator result,
Span< char > output )
inline

#include <FileSystemIteratorErrorFormatter.h>

Formats a FileSystemIterator result, including its fixed-size context when available.