forked from Shell4026/ShellEngine
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFileSystem.h
More file actions
23 lines (22 loc) · 888 Bytes
/
Copy pathFileSystem.h
File metadata and controls
23 lines (22 loc) · 888 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#pragma once
#include "Export.h"
#include <string>
#include <filesystem>
namespace sh::core
{
class FileSystem
{
public:
SH_CORE_API static auto GetDesktopDirectory() -> std::string;
SH_CORE_API static auto GetHomeDirectory() -> std::string;
/// @brief 해당 경로에 폴더를 만드는 함수. 이미 존재한다면 뒤에 숫자를 붙인다.
/// @param path 경로
/// @param name 폴더 이름
SH_CORE_API static void CreateFolder(const std::filesystem::path& path, std::string_view folderName);
/// @brief 해당 경로에 같은 이름의 파일이 존재 할 시 이름에 숫자를 붙여 반환하는 함수
/// @param path 경로
/// @param fileName 파일 이름
/// @return 새 파일 이름
SH_CORE_API static auto CreateUniqueFileName(const std::filesystem::path& path, const std::filesystem::path& fileName) -> std::string;
};
}//namespace