16 #if defined(FILE_SYSTEM_UTILS_ENABLED)
18 #ifndef ALEXA_CLIENT_SDK_AVSCOMMON_UTILS_INCLUDE_AVSCOMMON_UTILS_FILESYSTEM_FILESYSTEMUTILS_H_
19 #define ALEXA_CLIENT_SDK_AVSCOMMON_UTILS_INCLUDE_AVSCOMMON_UTILS_FILESYSTEM_FILESYSTEMUTILS_H_
55 namespace filesystem {
58 using Permissions = uint32_t;
64 enum PermBits : Permissions {
87 extern const Permissions DEFAULT_DIRECTORY_PERMISSIONS;
89 extern const Permissions DEFAULT_FILE_PERMISSIONS;
100 enum class FileType { REGULAR_FILE, DIRECTORY, ALL };
110 bool changePermissions(
const std::string& path, Permissions perms);
120 bool exists(
const std::string& path);
129 std::string currentDirectory();
143 bool makeDirectory(
const std::string& path, Permissions perms = DEFAULT_DIRECTORY_PERMISSIONS);
156 std::vector<std::string> list(
const std::string& path, FileType type = FileType::ALL);
165 bool move(
const std::string& source,
const std::string& destination);
180 std::string basenameOf(
const std::string& path);
199 std::string parentDirNameOf(
const std::string& path);
209 bool removeAll(
const std::string& path);
221 size_t sizeOf(
const std::string& path);
232 size_t availableSpace(
const std::string& path);
241 bool pathContainsPrefix(
const std::string& path,
const std::string& prefix);
248 #endif // ALEXA_CLIENT_SDK_AVSCOMMON_UTILS_INCLUDE_AVSCOMMON_UTILS_FILESYSTEM_FILESYSTEMUTILS_H_
250 #endif // FILE_SYSTEM_UTILS_ENABLED