Skip to content

Commit

Permalink
Add documentation comments and nodiscard attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
mogemimi committed Sep 21, 2019
1 parent c9621f9 commit ec54d35
Showing 1 changed file with 23 additions and 9 deletions.
32 changes: 23 additions & 9 deletions include/Pomdog/Utility/FileSystem.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,33 +8,47 @@
namespace Pomdog {

struct POMDOG_EXPORT FileSystem final {
static bool CreateDirectory(const std::string& path);
/// Create a new directory with the specified path.
[[nodiscard]] static bool
CreateDirectory(const std::string& path);

static bool CreateDirectories(const std::string& path);
/// Create a new directory with the specified path.
[[nodiscard]] static bool
CreateDirectories(const std::string& path);

static bool Exists(const std::string& path);
/// Returns true if the file exists, false otherwise.
[[nodiscard]] static bool
Exists(const std::string& path);

static bool IsDirectory(const std::string& path);
/// Returns true if the file is directory, false otherwise.
[[nodiscard]] static bool
IsDirectory(const std::string& path);

// Windows:
// - "<user name>\Local Settings\Applicaiton Data\Pomdog"
// - "C:\Users\<user name>\AppData\Local\Pomdog"
static std::string GetLocalAppDataDirectoryPath();
[[nodiscard]] static std::string
GetLocalAppDataDirectoryPath();

// Windows:
// - "<user name>\Application Data\Pomdog"
// - "C:\Users\<user name>\AppData\Roaming\Pomdog"
static std::string GetAppDataDirectoryPath();
[[nodiscard]] static std::string
GetAppDataDirectoryPath();

// Windows:
// - "<current directory>"
static std::string GetResourceDirectoryPath();
[[nodiscard]] static std::string
GetResourceDirectoryPath();

// Windows:
// - "C:\Users\<user name>\AppData\Local\Temp"
static std::string GetTempDirectoryPath();
[[nodiscard]] static std::string
GetTempDirectoryPath();

static std::string GetCurrentWorkingDirectory();
/// Gets the current working directory.
[[nodiscard]] static std::string
GetCurrentWorkingDirectory();
};

} // namespace Pomdog

0 comments on commit ec54d35

Please sign in to comment.