MCPcopy Create free account
hub / github.com/Xtra-Computing/thundersvm / File

Class File

include/thundersvm/util/log.h:1094–1119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1092 } // namespace threading
1093 namespace utils {
1094 class File : base::StaticClass {
1095 public:
1096 /// @brief Creates new out file stream for specified filename.
1097 /// @return Pointer to newly created fstream or nullptr
1098 static base::type::fstream_t* newFileStream(const std::string& filename);
1099
1100 /// @brief Gets size of file provided in stream
1101 static std::size_t getSizeOfFile(base::type::fstream_t* fs);
1102
1103 /// @brief Determines whether or not provided path exist in current file system
1104 static bool pathExists(const char* path, bool considerFile = false);
1105
1106 /// @brief Creates specified path on file system
1107 /// @param path Path to create.
1108 static bool createPath(const std::string& path);
1109 /// @brief Extracts path of filename with leading slash
1110 static std::string extractPathFromFilename(const std::string& fullPath,
1111 const char* seperator = base::consts::kFilePathSeperator);
1112 /// @brief builds stripped filename and puts it in buff
1113 static void buildStrippedFilename(const char* filename, char buff[],
1114 std::size_t limit = base::consts::kSourceFilenameMaxLength);
1115 /// @brief builds base filename and puts it in buff
1116 static void buildBaseFilename(const std::string& fullPath, char buff[],
1117 std::size_t limit = base::consts::kSourceFilenameMaxLength,
1118 const char* seperator = base::consts::kFilePathSeperator);
1119 };
1120/// @brief String utilities helper class used internally. You should not use it.
1121 class Str : base::StaticClass {
1122 public:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected