10 #ifndef TURI_FILEIO_FS_UTILS_HPP 11 #define TURI_FILEIO_FS_UTILS_HPP 15 #include <core/storage/fileio/sanitize_url.hpp> 25 MISSING, REGULAR_FILE, DIRECTORY, FS_UNAVAILABLE
35 std::pair<file_status, std::string>
get_file_status(
const std::string& path);
118 std::tuple<std::string, std::string, std::string>
parse_hdfs_url(std::string url);
125 bool is_writable_protocol(std::string protocol);
129 bool is_web_protocol(std::string protocol);
141 std::string get_protocol(std::string path);
220 std::pair<std::string, std::string> split_path_elements(
230 const std::string& url);
252 void copy(
const std::string src,
const std::string dest);
bool delete_path_recursive(const std::string &path)
bool delete_path_impl(const std::string &path, file_status status=file_status::FS_UNAVAILABLE)
std::string convert_to_generic(const std::string &path)
bool delete_path(const std::string &path, file_status status=file_status::FS_UNAVAILABLE)
bool create_directory(const std::string &path)
bool create_directory_or_throw(const std::string &path)
std::tuple< std::string, std::string, std::string > parse_hdfs_url(std::string url)
bool try_to_open_file(const std::string url)
bool change_file_mode(const std::string path, short mode)
std::string make_canonical_path(const std::string &path)
std::string remove_protocol(std::string path)
std::pair< file_status, std::string > get_file_status(const std::string &path)
size_t get_io_parallelism_id(const std::string url)
std::vector< std::pair< std::string, file_status > > get_directory_listing(const std::string &path)
std::string get_dirname(std::string path)
std::vector< std::pair< std::string, file_status > > get_glob_files(const std::string &url)
std::string make_relative_path(std::string root_directory, std::string path)
void copy(Iterator begin, Iterator end, SWriter &&writer)
std::string make_absolute_path(std::string root_directory, std::string path)
std::string get_filename(std::string path)