23#ifndef __CBUILD_FILESYSTEM_HPP__
24#define __CBUILD_FILESYSTEM_HPP__
74std::vector<std::string>
dir(std::string path, std::string search);
81std::vector<std::string>
dir(std::string path);
89std::vector<std::string>
dir_rec(std::string path, std::string search);
96std::vector<std::string>
dir_rec(std::string path);
104bool remove(std::string path,
bool force =
false);
112bool copy(std::string start, std::string end);
120bool move(std::string start, std::string end);
129bool rename(std::string start, std::string end);
144bool exists(std::string path);
152std::string
normalize_path(std::string path, std::string base_path =
"");
166std::string
base(std::string file);
std::string normalize_path(std::string path, std::string base_path="")
Get absolute path to file using relative path and base path.
bool exists(std::string path)
Check if file exists.
bool create(std::vector< std::string > paths, CBuild::fs::type what)
Create element.
std::string base(std::string file)
Get base file path (path to dir in what file is)
bool remove(std::string path, bool force=false)
Delete files or directories.
std::string curr_path()
Get current working dir of CBuild.run process.
std::string normalize_relative_path(std::string path, std::string base_path="")
Get absolute path to file using relative path and base path.
bool copy(std::string start, std::string end)
Copy files or directories.
type
Type for element creating.
@ DIRECTORY
Standard directory.
@ HARDLINK
Standard hardlink (can be unsupported or supported partially) (though std::filesystem::create_hard_li...
@ SYMLINK_DIR
Alias for SYMLINK_DIRECTORY.
@ SYMLINK_FILE
Standard symlink (can be unsupported or supported partially) (thought std::filesystem::create_symlink...
@ SYMLINK_DIRECTORY
Standard symlink (can be unsupported or supported partially) (std::filesystem::create_directory_symli...
@ DIR
Alias for DIRECTORY.
bool move(std::string start, std::string end)
Move files or directories, remove starting files or directories.
std::vector< std::string > dir_rec(std::string path, std::string search)
Recursively search files using provided regex.
bool rename(std::string start, std::string end)
Rename files or directories,.
std::vector< std::string > dir(std::string path, std::string search)
Search files using provided regex.
Filebuffer for CBuild ecosystem.