|
roo_io
API Documentation for roo_io
|
#include <filesystem.h>
Public Types | |
| enum | MediaPresence { kMediaAbsent = 0 , kMediaPresent = 1 , kMediaPresenceUnknown = 2 } |
| enum | MountingPolicy { kMountReadWrite , kMountReadOnly , kMountDisabled } |
| enum | UnmountingPolicy { kUnmountLazily = 0 , kUnmountEagerly = 1 } |
Public Member Functions | |
| virtual | ~Filesystem ()=default |
| Mount | mount () |
| bool | isMounted () const |
| bool | isInUse () const |
| virtual MediaPresence | checkMediaPresence ()=0 |
| MountingPolicy | mountingPolicy () const |
| void | setMountingPolicy (MountingPolicy mounting_policy) |
| UnmountingPolicy | unmountingPolicy () const |
| void | setUnmountingPolicy (UnmountingPolicy unmounting_policy) |
| void | forceUnmount () |
Protected Member Functions | |
| Filesystem () | |
| virtual MountImpl::MountResult | mountImpl (std::function< void()> unmount_fn)=0 |
| virtual void | unmountImpl ()=0 |
Definition at line 14 of file filesystem.h.
| Enumerator | |
|---|---|
| kMediaAbsent | |
| kMediaPresent | |
| kMediaPresenceUnknown | |
Definition at line 19 of file filesystem.h.
| Enumerator | |
|---|---|
| kMountReadWrite | |
| kMountReadOnly | |
| kMountDisabled | |
Definition at line 32 of file filesystem.h.
| Enumerator | |
|---|---|
| kUnmountLazily | |
| kUnmountEagerly | |
Definition at line 45 of file filesystem.h.
|
virtualdefault |
|
inlineprotected |
Definition at line 116 of file filesystem.h.
|
pure virtual |
Referenced by mount().
| void roo_io::Filesystem::forceUnmount | ( | ) |
Definition at line 44 of file filesystem.cpp.
References unmountImpl().
|
inline |
Definition at line 76 of file filesystem.h.
References kUnmountEagerly.
|
inline |
Definition at line 70 of file filesystem.h.
| Mount roo_io::Filesystem::mount | ( | ) |
Definition at line 5 of file filesystem.cpp.
References checkMediaPresence(), roo_io::kGenericMountError, kMediaAbsent, kMountDisabled, kMountReadOnly, roo_io::kNoMedia, roo_io::kNotMounted, roo_io::kOk, kUnmountLazily, mountImpl(), mountingPolicy(), roo_io::MountImpl::MountResult::status, and unmountImpl().
Referenced by roo_io::FileResource::open().
|
protectedpure virtual |
Referenced by mount().
|
inline |
Definition at line 87 of file filesystem.h.
Referenced by mount().
|
inline |
Definition at line 91 of file filesystem.h.
| void roo_io::Filesystem::setUnmountingPolicy | ( | UnmountingPolicy | unmounting_policy | ) |
Definition at line 35 of file filesystem.cpp.
References kUnmountEagerly.
Referenced by forceUnmount(), and mount().
|
inline |
Definition at line 96 of file filesystem.h.