로딩중...
검색중...
일치하는것 없음
by::fsystem 클래스 참조

Cross-platform filesystem utilities for recursive file traversal 더 자세히 ...

#include <fsystem.hpp>

Public 멤버 함수

static iterator find (std::filesystem::path(path))
 
static iterator iterator ())
 
static iterator find (std::filesystem::path(it))
 
static iterator iterator ())
 

정적 Public 멤버 함수

static iterator find (const std::filesystem::path &path)
 Creates iterator for recursive filesystem traversal
 
static iterator find (const std::string &path) BY_SIDE_FUNC(true
 
static iterator find (const nchar *it) BY_SIDE_FUNC(it
 
static std::filesystem::path getCurrentDir ()
 

상세한 설명

Cross-platform filesystem utilities for recursive file traversal

A simple class for recursively traversing files in a specified folder. Provides platform-independent API that works on both Windows and POSIX-compliant operating systems. Core functionality is provided through the iterator class.

Usage

Basic usage example:

auto e = fsystem::find("../your/path");
while(e.next()) { // Returns false when all files are traversed
const std::filesystem::path& p = *e; // Path of the found file
if(*e == "../your/path/child/helloWorld.cpp") // Always uses
relative paths doSomething(e->getDir()); // Returns the folder path of the
}
static iterator find(const std::filesystem::path &path)
Creates iterator for recursive filesystem traversal
Weak reference smart pointer with type-safe access
Definition tweak.hpp:16
Remarks
Always iterates files only Empty folders are skipped during iteration.

Checking whether a path is there

A path naming one file works too, so an existence check is just an iterator that is not empty.

if(fsystem::find("your/path/config.stela").next())

supports partial glob patterns

You can use aterisk (*) and question mark (?) wildcards in the pattern.

auto e = fsystem::find("*.cpp"); // the only difference is here
while(e.next()) {
const std::filesystem::path& p = *e;
if(*e == "your/path/child/helloWorld.cpp")
doSomething(e->getDir());
}

멤버 함수 문서화

◆ find()

static iterator by::fsystem::find ( const std::filesystem::path & path)
static

Creates iterator for recursive filesystem traversal

반환값
iterator positioned at first file, or at end if path invalid
주의
Automatically traverses subdirectories recursively, yielding only files

이 클래스에 대한 문서화 페이지는 다음의 파일로부터 생성되었습니다.:
to Top