Lines Matching refs:path

11 bool isAnySymlink(const std::filesystem::path& path)  in isAnySymlink()  argument
13 auto currentPath = path; in isAnySymlink()
14 while (currentPath != path.root_path()) in isAnySymlink()
38 const auto path = join(directory, filePath); in store() local
42 "Store to file", phosphor::logging::entry("PATH=%s", path.c_str())); in store()
44 std::filesystem::create_directories(path.parent_path(), ec); in store()
48 "Unable to create directory for file: " + path.string() + in store()
52 assertThatPathIsNotSymlink(path); in store()
54 std::ofstream file(path); in store()
58 throw std::runtime_error("Unable to create file: " + path.string()); in store()
61 limitPermissions(path.parent_path()); in store()
62 limitPermissions(path); in store()
73 const auto path = join(directory, filePath); in remove() local
75 if (isAnySymlink(path)) in remove()
82 auto removed = std::filesystem::remove(path, ec); in remove()
87 phosphor::logging::entry("PATH=%s", path.c_str()), in remove()
93 std::filesystem::remove(path.parent_path(), ec); in remove()
101 const auto path = join(directory, filePath); in load() local
102 if (!std::filesystem::exists(path)) in load()
111 assertThatPathIsNotSymlink(path); in load()
112 std::ifstream file(path); in load()
136 if (p.is_regular_file() && !isAnySymlink(p.path())) in list()
138 auto item = std::filesystem::relative(p.path(), directory); in list()
146 std::filesystem::path PersistentJsonStorage::join( in join()
147 const std::filesystem::path& left, const std::filesystem::path& right) in join()
152 void PersistentJsonStorage::limitPermissions(const std::filesystem::path& path) in limitPermissions() argument
158 path, std::filesystem::is_directory(path) ? dirPerms : filePerms, in limitPermissions()
168 const std::filesystem::path& path) in assertThatPathIsNotSymlink() argument
170 if (isAnySymlink(path)) in assertThatPathIsNotSymlink()
174 path.c_str()); in assertThatPathIsNotSymlink()