• Home
  • Raw
  • Download

Lines Matching refs:path

181     return fs::path(fileFullName).parent_path().string();  in ExtractFilePath()
186 return fs::path(fileFullName).filename().string(); in ExtractFileName()
189 void GetDirFiles(const std::string& path, std::vector<std::string>& files) in GetDirFiles() argument
192 for (const auto& p : fs::directory_iterator(path)) { in GetDirFiles()
193 files.push_back(p.path().string()); in GetDirFiles()
199 bool ForceCreateDirectory(const std::string& path) in ForceCreateDirectory() argument
202 if (fs::exists(path, ec)) { in ForceCreateDirectory()
205 if (!fs::create_directories(path, ec)) { in ForceCreateDirectory()
208 return fs::exists(path, ec); in ForceCreateDirectory()
211 bool ForceCreateDirectory(const std::string& path, int mode) in ForceCreateDirectory() argument
213 if (!ForceCreateDirectory(path)) { in ForceCreateDirectory()
216 return ChangeModeDirectory(path, mode); in ForceCreateDirectory()
219 bool ForceRemoveDirectory(const std::string& path, bool isNeedDeleteGivenDirSelf) in ForceRemoveDirectory() argument
222 fs::remove_all(path, ec); in ForceRemoveDirectory()
233 uint64_t GetFileSize(const std::string& path) in GetFileSize() argument
236 return fs::file_size(path, ec); in GetFileSize()
239 uint64_t GetFolderSize(const std::string& path) in GetFolderSize() argument
243 GetDirFiles(path, files); in GetFolderSize()
254 int CreateFile(const std::string &path, mode_t mode) in CreateFile() argument
256 if (FileExists(path)) { in CreateFile()
259 std::ofstream fout(path); in CreateFile()
265 if (ChangeMode(path, mode) != 0) { in CreateFile()
290 bool IsDirectory(const std::string &path) in IsDirectory() argument
292 return fs::is_directory(path); in IsDirectory()
330 std::string GetParentDir(const std::string &path) in GetParentDir() argument
332 string str = ExtractFilePath(path); in GetParentDir()
353 bool ChangeModeDirectory(const string& path, const mode_t& mode) in ChangeModeDirectory() argument
355 if (!FileExists(path)) { in ChangeModeDirectory()
359 for (auto& p : fs::recursive_directory_iterator(path)) { in ChangeModeDirectory()
360 string tmpPath = p.path().string(); in ChangeModeDirectory()
366 return ChangeMode(path, mode); in ChangeModeDirectory()
369 bool PathToRealPath(const std::string& path, std::string& realPath) in PathToRealPath() argument
371 if (path.empty()) { in PathToRealPath()
375 if ((path.length() >= PATH_MAX)) { in PathToRealPath()
378 if (!fs::exists(path)) { in PathToRealPath()
381 fs::path absolutePath = fs::canonical(path); in PathToRealPath()