Skip to content
This repository has been archived by the owner on Feb 22, 2024. It is now read-only.
/ DirectoryFilesList Public archive

Implementation of the C++ function that returns a list of files in a certain directory by a given mask (file extension). It's my homework task on the subject "Information security".

Notifications You must be signed in to change notification settings

seigtm/DirectoryFilesList

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

List files in a directory C++ function.

Implementation of the C++ function that returns a list of files in a certain directory by a given mask (file extension).

// Returns a vector of file name strings in some directory with some extension.
std::vector<std::string> getDirectoryFiles(const fs::path &directory = fs::current_path(),
                                           const std::vector<std::string> extensions = {})

It's my homework task on the subject "Information security".

Usage examples:

Returns the list of the names of all files in the current directory.

auto fileList = getDirectoryFiles();

Returns the list of the names of all files in the current directory with the "*.exe" extension.

auto fileList = getDirectoryFiles(fs::current_path(), {".exe"});

Returns the list of the names of all files in the current directory with the ".png", ".bmp" or ".jpg" extension.

auto fileList = getDirectoryFiles(fs::current_path(), {".png", ".bmp", ".jpg"});

About

Implementation of the C++ function that returns a list of files in a certain directory by a given mask (file extension). It's my homework task on the subject "Information security".

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages