C# Класс Mosa.FileSystem.VFS.DirectoryEntry

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Allocate ( DirectoryEntry parent, string name, IVfsNode node ) : DirectoryEntry

Allocates a new DirectoryEntry object for the given settings.

This method is used to control the DirectoryEntry allocation and maintain a cache of them. Also used to prevent infinite name allocations.

AllocateRoot ( IVfsNode node ) : DirectoryEntry

Allocates a vfs root directory entry.

This method creates a directory entry, which has some special properties. The first one is, that its parent is itself. This provides for the ability to cd .. on the root to stay on the root. The next ability is to create specialized root directories to isolate processes from the remainder of the file system. Setting a root directory created using this method effectively limits the process to access inside of the newly created namespace.

DirectoryEntry ( )

Lookup ( string name ) : DirectoryEntry

Release ( ) : void

Releases the DirectoryEntry from the parent DirectoryEntry. This is *not* a delete operation.

This function is used to remove a DirectoryEntry from the cache. Some (networked) file systems may want to use this function to remove "known" directories from the lookup cache when they loose server connection.

Приватные методы

Метод Описание
InsertChild ( DirectoryEntry child ) : void

RemoveChild ( DirectoryEntry child ) : void

Setup ( DirectoryEntry parent, string name, IVfsNode node ) : void

Описание методов

Allocate() публичный статический Метод

Allocates a new DirectoryEntry object for the given settings.
This method is used to control the DirectoryEntry allocation and maintain a cache of them. Also used to prevent infinite name allocations.
If any one of the parameters is null. If the name is zero-length.
public static Allocate ( DirectoryEntry parent, string name, IVfsNode node ) : DirectoryEntry
parent DirectoryEntry The parent directory entry.
name string The name of the entry to create.
node IVfsNode The vfs node referenced by the directory entry.
Результат DirectoryEntry

AllocateRoot() публичный статический Метод

Allocates a vfs root directory entry.
This method creates a directory entry, which has some special properties. The first one is, that its parent is itself. This provides for the ability to cd .. on the root to stay on the root. The next ability is to create specialized root directories to isolate processes from the remainder of the file system. Setting a root directory created using this method effectively limits the process to access inside of the newly created namespace.
The specified node is invalid.
public static AllocateRoot ( IVfsNode node ) : DirectoryEntry
node IVfsNode The vfs node, which corresponds to the root directory.
Результат DirectoryEntry

DirectoryEntry() публичный Метод

public DirectoryEntry ( )

Lookup() публичный Метод

public Lookup ( string name ) : DirectoryEntry
name string
Результат DirectoryEntry

Release() публичный Метод

Releases the DirectoryEntry from the parent DirectoryEntry. This is *not* a delete operation.
This function is used to remove a DirectoryEntry from the cache. Some (networked) file systems may want to use this function to remove "known" directories from the lookup cache when they loose server connection.
public Release ( ) : void
Результат void