roo_io
API Documentation for roo_io
Loading...
Searching...
No Matches
fsutil.h
Go to the documentation of this file.
1#pragma once
2
3#include <memory>
4
8
9namespace roo_io {
10
11// Recursively deletes the specified file or directory, if it exists.
12// Does nothing, and returns kNotFound, if it does not exist.
13Status DeleteRecursively(roo_io::Mount& fs, const char* path);
14
15// Recursively creates the specified directory. If the directory already exists,
16// returns 'kDirectoryExists'. If the path, or any of its subcomponents, names
17// an existing file, returns 'kNotDirectory'.
18Status MkDirRecursively(roo_io::Mount& fs, const char* path);
19
20// Recursively creates a parent directory of the specified named file or
21// directory, without creating the target file or directory itself. If the
22// parent directory already exists, returns 'kDirectoryExists'. If the parent
23// directory or any of its subcomponents is an existing file, returns
24// 'kNotDirectory'.
26
27// Opens the specified file for reading, and returns a reader that allows to
28// efficiently read typed data from that file.
29MultipassInputStreamReader OpenDataFile(roo_io::Mount& fs, const char* path);
30
31// Opens the specified file for writing, and returns a writer that allows to
32// efficiently write typed data to that file.
33OutputStreamWriter OpenDataFileForWrite(roo_io::Mount& fs, const char* path,
35
36} // namespace roo_io
Definition byte.h:6
Status MkDirRecursively(roo_io::Mount &fs, const char *path)
Definition fsutil.cpp:33
roo::basic_string_view< CharT, Traits > basic_string_view
Definition string_view.h:8
Status DeleteRecursively(roo_io::Mount &fs, const char *path)
Definition fsutil.cpp:19
OutputStreamWriter OpenDataFileForWrite(roo_io::Mount &fs, const char *path, roo_io::FileUpdatePolicy update_policy)
Definition fsutil.cpp:89
MultipassInputStreamReader OpenDataFile(roo_io::Mount &fs, const char *path)
Definition fsutil.cpp:85
Status
Definition status.h:7
Status MkParentDirRecursively(roo_io::Mount &fs, const char *path)
Definition fsutil.cpp:63