File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -149,4 +149,9 @@ Expected<void> MkDir(absl::string_view path) {
149149 return {};
150150}
151151
152+ Expected<std::string> Parent (absl::string_view path) {
153+ auto std_path = MakeStdPath (path);
154+ return std_path.parent_path ().generic_string ();
155+ }
156+
152157} // namespace litert::internal
Original file line number Diff line number Diff line change @@ -56,6 +56,9 @@ Expected<std::string> Filename(absl::string_view path);
5656// Make a new directory at the given path.
5757Expected<void > MkDir (absl::string_view path);
5858
59+ // Get the parent directory of the given path.
60+ Expected<std::string> Parent (absl::string_view path);
61+
5962} // namespace litert::internal
6063
6164#endif // ODML_LITERT_LITERT_CORE_FILESYSTEM_H_
You can’t perform that action at this time.
0 commit comments