VFS - Ported from old LW code
This commit is contained in:
parent
68716e9193
commit
bb94169a31
4 changed files with 694 additions and 0 deletions
include/ebcl/inline
60
include/ebcl/inline/VFS.hh
Normal file
60
include/ebcl/inline/VFS.hh
Normal file
|
@ -0,0 +1,60 @@
|
|||
/******************************************************************************/
|
||||
/* VIRTUAL FILE SYSTEM - INLINE CODE ******************************************/
|
||||
/******************************************************************************/
|
||||
|
||||
#ifndef _H_EBCL_INLINE_VFS
|
||||
#define _H_EBCL_INLINE_VFS
|
||||
#include <ebcl/VFS.hh>
|
||||
namespace ebcl {
|
||||
|
||||
|
||||
/*= A_VFSDriver ==============================================================*/
|
||||
|
||||
inline A_VFSDriver::~A_VFSDriver( )
|
||||
{ }
|
||||
|
||||
inline bool A_VFSDriver::exists( T_FSPath const& path )
|
||||
{
|
||||
const auto et( typeOf( path ) );
|
||||
return et != E_FSEntryType::NONE;
|
||||
}
|
||||
|
||||
|
||||
/*= T_VFSFilesystemDriver ====================================================*/
|
||||
|
||||
inline T_FSPath const& T_VFSFilesystemDriver::root( ) const
|
||||
{
|
||||
return root_;
|
||||
}
|
||||
|
||||
|
||||
/*= X_VFSInitialisationFailure ===============================================*/
|
||||
|
||||
inline X_VFSInitialisationFailure::X_VFSInitialisationFailure( )
|
||||
: std::runtime_error( "unable to initialise VFS" )
|
||||
{ }
|
||||
|
||||
|
||||
/*= T_VFS ====================================================================*/
|
||||
|
||||
template<
|
||||
typename DriverType ,
|
||||
typename... ArgTypes
|
||||
>
|
||||
inline T_RegisteredItem T_VFS::addDriver( ArgTypes&& ... arguments )
|
||||
{
|
||||
return addDriver( NewOwned< DriverType >(
|
||||
std::forward< ArgTypes >( arguments ) ... ) );
|
||||
}
|
||||
|
||||
inline constexpr T_FSPathStyle T_VFS::Style( ) noexcept
|
||||
{
|
||||
return T_FSPathStyle{ true , false ,
|
||||
T_Flags< E_FSPathSeparator >{
|
||||
E_FSPathSeparator::SLASH ,
|
||||
E_FSPathSeparator::BACKSLASH } };
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
#endif // _H_EBCL_INLINE_VFS
|
Loading…
Add table
Add a link
Reference in a new issue