The Pedigree Project 0.1
Classes | Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
VfsMountView Class Reference

#include <MountView.h>

+ Collaboration diagram for VfsMountView:

Classes

struct  MountSnapshot
 
struct  ResolveOptions
 
struct  State
 

Public Types

enum class  BackingOwnership { External , Attachment }
 

Public Member Functions

 VfsMountView (VFS &vfs)
 
bool initialise (Filesystem *bootRoot)
 
bool createBootContext (FilesystemContextOwner &result)
 
bool resolve (const FilesystemContextRef &context, const FilesystemPathRef &start, const String &path, const ResolveOptions &options, FilesystemPathRef &result)
 
bool follow (const FilesystemContextRef &context, const FilesystemPathRef &selected, FilesystemPathRef &result)
 
bool resolveParent (const FilesystemContextRef &context, const FilesystemPathRef &start, const String &path, FilesystemPathRef &parent, String &basename)
 
bool changeCwd (const FilesystemContextRef &context, const FilesystemPathRef &path)
 
bool changeRoot (const FilesystemContextRef &context, const FilesystemPathRef &path)
 
bool formatPath (const FilesystemContextSnapshot &context, const FilesystemPathRef &path, String &result)
 
bool snapshotMounts (const FilesystemContextRef &context, Vector< MountSnapshot > &result)
 
bool attach (const FilesystemContextRef &context, const FilesystemPathRef &covered, Filesystem *backing, BackingOwnership ownership=BackingOwnership::External)
 
bool detach (const FilesystemContextRef &context, const String &target, bool lazy)
 
bool detachBackingForShutdown (Filesystem *backing)
 
bool shutdown (Vector< Filesystem * > &ownedBackings)
 
bool pivot (const FilesystemContextRef &context, const String &newRoot, const String &putOld)
 
uint64_t attachmentId (const FilesystemPathRef &path) const
 
bool isMountpoint (File *node) const
 
bool createFile (const FilesystemPathRef &parent, const String &name, uint32_t mask)
 
bool createDirectory (const FilesystemPathRef &parent, const String &name, uint32_t mask)
 
bool createSymlink (const FilesystemPathRef &parent, const String &name, const String &value)
 
bool createLink (const FilesystemPathRef &parent, const String &name, const FilesystemPathRef &target)
 
bool remove (const FilesystemPathRef &parent, const String &name, File *expected=nullptr)
 
bool rename (const FilesystemPathRef &oldParent, const String &oldName, const FilesystemPathRef &newParent, const String &newName, bool noReplace, bool sourceMustBeDirectory=false)
 
bool anonymousPath (File *retainedNode, FilesystemPathRef &result)
 
bool pathForNode (const FilesystemPathRef &sameAttachment, File *retainedNode, FilesystemPathRef &result)
 
bool samePath (const FilesystemPathRef &first, const FilesystemPathRef &second) const
 
bool bootRootPath (FilesystemPathRef &result)
 

Private Member Functions

 VfsMountView (const VfsMountView &)=delete
 
VfsMountView & operator= (const VfsMountView &)=delete
 

Private Attributes

State * m_State
 
VFS & m_Vfs
 

Friends

class VfsPath
 
class VfsFilesystemContext
 

Detailed Description

One shared view. Filesystem registration and storage retirement stay in VFS.

Definition at line 17 of file MountView.h.

Member Enumeration Documentation

◆ BackingOwnership

enum class VfsMountView::BackingOwnership
strong

Definition at line 47 of file MountView.h.

Constructor & Destructor Documentation

◆ VfsMountView()

VfsMountView::VfsMountView ( VFS &  vfs)
explicit

Definition at line 98 of file MountView.cc.

◆ ~VfsMountView()

VfsMountView::~VfsMountView ( )

Definition at line 99 of file MountView.cc.

Member Function Documentation

◆ anonymousPath()

bool VfsMountView::anonymousPath ( File *  retainedNode,
FilesystemPathRef &  result 
)

Definition at line 393 of file MountView.cc.

◆ attach()

bool VfsMountView::attach ( const FilesystemContextRef &  context,
const FilesystemPathRef &  covered,
Filesystem *  backing,
BackingOwnership  ownership = BackingOwnership::External 
)

Definition at line 58 of file MountView-mounts.cc.

◆ attachmentId()

uint64_t VfsMountView::attachmentId ( const FilesystemPathRef &  path) const

Definition at line 383 of file MountView.cc.

◆ bootRootPath()

bool VfsMountView::bootRootPath ( FilesystemPathRef &  result)

Definition at line 224 of file MountView.cc.

◆ changeCwd()

bool VfsMountView::changeCwd ( const FilesystemContextRef &  context,
const FilesystemPathRef &  path 
)

Definition at line 339 of file MountView.cc.

◆ changeRoot()

bool VfsMountView::changeRoot ( const FilesystemContextRef &  context,
const FilesystemPathRef &  path 
)

Definition at line 361 of file MountView.cc.

◆ createBootContext()

bool VfsMountView::createBootContext ( FilesystemContextOwner &  result)

Definition at line 237 of file MountView.cc.

◆ createDirectory()

bool VfsMountView::createDirectory ( const FilesystemPathRef &  parent,
const String &  name,
uint32_t  mask 
)

Definition at line 58 of file MountView-entries.cc.

◆ createFile()

bool VfsMountView::createFile ( const FilesystemPathRef &  parent,
const String &  name,
uint32_t  mask 
)

Definition at line 54 of file MountView-entries.cc.

◆ createLink()

bool VfsMountView::createLink ( const FilesystemPathRef &  parent,
const String &  name,
const FilesystemPathRef &  target 
)

Definition at line 68 of file MountView-entries.cc.

◆ createSymlink()

bool VfsMountView::createSymlink ( const FilesystemPathRef &  parent,
const String &  name,
const String &  value 
)

Definition at line 63 of file MountView-entries.cc.

◆ detach()

bool VfsMountView::detach ( const FilesystemContextRef &  context,
const String &  target,
bool  lazy 
)

Definition at line 166 of file MountView-mounts.cc.

◆ detachBackingForShutdown()

bool VfsMountView::detachBackingForShutdown ( Filesystem *  backing)

Definition at line 322 of file MountView-mounts.cc.

◆ follow()

bool VfsMountView::follow ( const FilesystemContextRef &  context,
const FilesystemPathRef &  selected,
FilesystemPathRef &  result 
)

Definition at line 349 of file MountView-path.cc.

◆ formatPath()

bool VfsMountView::formatPath ( const FilesystemContextSnapshot &  context,
const FilesystemPathRef &  path,
String &  result 
)

Definition at line 66 of file MountView-report.cc.

◆ initialise()

bool VfsMountView::initialise ( Filesystem *  bootRoot)

Definition at line 181 of file MountView.cc.

◆ isMountpoint()

bool VfsMountView::isMountpoint ( File *  node) const

Definition at line 44 of file MountView-entries.cc.

◆ pathForNode()

bool VfsMountView::pathForNode ( const FilesystemPathRef &  sameAttachment,
File *  retainedNode,
FilesystemPathRef &  result 
)

Definition at line 407 of file MountView.cc.

◆ pivot()

bool VfsMountView::pivot ( const FilesystemContextRef &  context,
const String &  newRoot,
const String &  putOld 
)

Definition at line 213 of file MountView-mounts.cc.

◆ remove()

bool VfsMountView::remove ( const FilesystemPathRef &  parent,
const String &  name,
File *  expected = nullptr 
)

Definition at line 90 of file MountView-entries.cc.

◆ rename()

bool VfsMountView::rename ( const FilesystemPathRef &  oldParent,
const String &  oldName,
const FilesystemPathRef &  newParent,
const String &  newName,
bool  noReplace,
bool  sourceMustBeDirectory = false 
)

Definition at line 94 of file MountView-entries.cc.

◆ resolve()

bool VfsMountView::resolve ( const FilesystemContextRef &  context,
const FilesystemPathRef &  start,
const String &  path,
const ResolveOptions &  options,
FilesystemPathRef &  result 
)

Definition at line 312 of file MountView-path.cc.

◆ resolveParent()

bool VfsMountView::resolveParent ( const FilesystemContextRef &  context,
const FilesystemPathRef &  start,
const String &  path,
FilesystemPathRef &  parent,
String &  basename 
)

Definition at line 393 of file MountView-path.cc.

◆ samePath()

bool VfsMountView::samePath ( const FilesystemPathRef &  first,
const FilesystemPathRef &  second 
) const

Definition at line 387 of file MountView.cc.

◆ shutdown()

bool VfsMountView::shutdown ( Vector< Filesystem * > &  ownedBackings)

Definition at line 367 of file MountView-mounts.cc.

◆ snapshotMounts()

bool VfsMountView::snapshotMounts ( const FilesystemContextRef &  context,
Vector< MountSnapshot > &  result 
)

Definition at line 81 of file MountView-report.cc.

Friends And Related Symbol Documentation

◆ VfsFilesystemContext

friend class VfsFilesystemContext
friend

Definition at line 80 of file MountView.h.

◆ VfsPath

friend class VfsPath
friend

Definition at line 79 of file MountView.h.

Member Data Documentation

◆ m_State

State* VfsMountView::m_State
private

Definition at line 82 of file MountView.h.

◆ m_Vfs

VFS& VfsMountView::m_Vfs
private

Definition at line 83 of file MountView.h.


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