XII Release 0.1.0
Loading...
Searching...
No Matches
xiiFileSystemMirror< T > Class Template Reference

Copyright (c) Theophilus Eriata. All Rights Reserved. More...

#include <FileSystemMirror.h>

Classes

struct  DirectoryEntry

Public Types

enum class  Type { File , Directory }
using EnumerateFunc = xiiDelegate<void(const xiiStringBuilder& path, Type type)>

Public Member Functions

xiiResult AddDirectory (xiiStringView sPath, bool *out_pDirectoryExistsAlready=nullptr)
 Adds the directory, and all files in it recursively.
xiiResult AddFile (xiiStringView sPath, const T &value, bool *out_pFileExistsAlready, T *out_pOldValue)
 Adds a file. Creates directories if they do not exist.
xiiResult RemoveFile (xiiStringView sPath)
 Removes a file.
xiiResult RemoveDirectory (xiiStringView sPath)
 Removes a directory. Deletes any files & directories inside.
xiiResult MoveFile (xiiStringView sFromPath, xiiStringView sToPath)
 Moves a file, preserving its associated value.
xiiResult MoveDirectory (xiiStringView sFromPath, xiiStringView sToPath)
 Moves a directory. Any files & folders inside are moved with it.
xiiResult Enumerate (xiiStringView sPath, EnumerateFunc callbackFunc)
 Enumerates files and directories under the given path in post-order.
xiiResult GetType (xiiStringView sPath, Type &out_type)
 On success, out_Type will contains the type of the object (file or folder).
xiiResult GetPathCasing (xiiStringView sPath, xiiStringBuilder &out_sPath, Type &out_type) const

Detailed Description

template<typename T>
class xiiFileSystemMirror< T >

Copyright (c) Theophilus Eriata. All Rights Reserved.

Member Function Documentation

◆ GetPathCasing()

template<typename T>
xiiResult xiiFileSystemMirror< T >::GetPathCasing ( xiiStringView sPath,
xiiStringBuilder & out_sPath,
Type & out_type ) const

Resolves an existing cached path using case-insensitive component matching. Intended for filesystems whose notifications may use obsolete casing.


The documentation for this class was generated from the following file: