Class view¶
Defined in File view.hpp
Class Documentation¶
-
class
legion::core::filesystem
::
view
¶ Generates a view onto the virtual filesystem, can be used to do all kinds of fun stuff with, the underlying drivers.
Public Functions
-
virtual
~view
() = default¶
-
inline
view
(std::string_view path)¶
-
operator bool
() const¶ Checks the view for validity.
- Note
No deep check!
-
bool
is_valid
(bool deep_check = false) const¶ Checks the view for validity.
- Parameters
deep_check
: Also checks if the provided path can be resolved instead of doing just a basic sanity check.
-
file_traits
file_info
() const¶ Gets the traits of the file pointed to.
-
filesystem_traits
filesystem_info
() const¶ Gets the traits of the top most filesystem pointed to.
-
std::string
get_domain
() const¶ Gets the root domain.
-
const std::string &
get_virtual_path
() const¶ Gets full virtual path.
-
common::result_decay_more<std::string, fs_error>
get_extension
() const¶ Gets file extension if applicable.
- Note
You can use legion::common::valid to check for validity.
-
common::result_decay_more<std::string, fs_error>
get_filename
() const¶ Gets file name if applicable.
- Note
You can use legion::common::valid to check for validity.
-
common::result_decay_more<std::string, fs_error>
get_filestem
() const¶ Gets file name if applicable.
- Note
You can use legion::common::valid to check for validity.
-
common::result_decay_more<basic_resource, fs_error>
get
()¶ Gets the contents of the resource pointed to.
- Note
You can use legion::common::valid to check for validity.
-
common::result_decay_more<const basic_resource, fs_error>
get
() const¶
-
common::result<void, fs_error>
set
(const basic_resource &resource)¶ Sets the contents of the resource pointed to.
- Note
When setting was not possible has_err() will be true and get_err().what() will contain information on what went wrong.
-
virtual view
find
(std::string_view identifier) const¶ Creates a new view from a sub path (by first joining them together and then sanitizing the input)
-
template<class
T
, class ...Args
>
inline autoload_as
(Args&&... args) -> decltype(auto)¶ same as get().decay().to<T>()
-
common::result_decay_more<std::vector<view>, fs_error>
ls
() const¶
Protected Functions
-
view
() = default¶
-
std::shared_ptr<filesystem_resolver>
build
() const¶
-
void
make_inheritance
() const¶
-
std::shared_ptr<create_chain>
translate_solution
() const¶
-
struct
create_chain
¶ Public Members
-
std::shared_ptr<mem_filesystem_resolver>
subject
¶
-
std::shared_ptr<filesystem_resolver>
provider
¶
-
std::shared_ptr<create_chain>
next
¶
-
std::shared_ptr<mem_filesystem_resolver>
-
virtual