C# 클래스 Mosa.FileSystem.FAT.VfsDirectory

상속: Mosa.FileSystem.VFS.DirectoryNode
파일 보기 프로젝트 열기: tgiphil/MOSA-Project

보호된 프로퍼티들

프로퍼티 타입 설명
directoryCluster uint

공개 메소드들

메소드 설명
Create ( string name, VfsNodeType type, object settings ) : IVfsNode

Creates a new file system entry of the given name and type.

In theory every file system should support any VfsNodeType. Standard objects, such as directories and files are obvious. For other objects however, the file system is encouraged to store the passed settings in a specially marked file and treat these files as the appropriate node type. Instances of these objects can be retrieved using VfsObjectFactory.Create(settings). Access rights do not need to be checked by the node implementation. They have been already been checked by the VirtualFileSystem itself.

Delete ( IVfsNode child, DirectoryEntry dentry ) : void

Called to delete a child from a directory.

This function deletes a child IVfsNode from a directory. If child is a directory, it will be empty before this call is executed. It is recommended to include a debug sanity check though. If the file system needs to know the name of the child to delete, it can retrieve it from DirectoryEntry.Name.

Lookup ( string name ) : IVfsNode

Open ( FileAccess access, FileShare share ) : object

Opens the IVfsNode and returns an object capable of doing something smart with the IVfsNode.

This method is central to the entire VFS. It allows for interaction with file system entries in a way not possible with classical operating systems. The result of this function is heavily dependent on the item represented by the node, e.g. for a classic file (stream of bytes) the result of this method call would be a System.IO.Stream. For a device the result would be the driver object, for a directory it would be a System.IO.DirectoryInfo object, for kernel objects the respective object such as System.Threading.EventWaitHandle, System.Threading.Mutex, System.Threading.Thread, System.Diagnostics.Process etc. Note: The object retrieved can be closed by the respective methods on the returned object. There's no close functionality on the IVfsNode itself.

VfsDirectory ( IFileSystem fs, uint directoryCluster ) : System.IO

Initializes a new instance of the VfsDirectory class.

메소드 상세

Create() 공개 메소드

Creates a new file system entry of the given name and type.
In theory every file system should support any VfsNodeType. Standard objects, such as directories and files are obvious. For other objects however, the file system is encouraged to store the passed settings in a specially marked file and treat these files as the appropriate node type. Instances of these objects can be retrieved using VfsObjectFactory.Create(settings). Access rights do not need to be checked by the node implementation. They have been already been checked by the VirtualFileSystem itself.
The specified node type is not supported in the file system owning the node. See remarks about this.
public Create ( string name, VfsNodeType type, object settings ) : IVfsNode
name string The name of the file system entry to create.
type VfsNodeType The type of the file system entry. See remarks.
settings object Potential settings for the file system entry.
리턴 IVfsNode

Delete() 공개 메소드

Called to delete a child from a directory.
This function deletes a child IVfsNode from a directory. If child is a directory, it will be empty before this call is executed. It is recommended to include a debug sanity check though. If the file system needs to know the name of the child to delete, it can retrieve it from DirectoryEntry.Name.
The object does not support removal this way. There's most likely an object specific API to remove this IVfsNode.
public Delete ( IVfsNode child, DirectoryEntry dentry ) : void
child IVfsNode The IVfsNode interface of the child.
dentry Mosa.FileSystem.VFS.DirectoryEntry The DirectoryEntry of the child.
리턴 void

Lookup() 공개 메소드

public Lookup ( string name ) : IVfsNode
name string
리턴 IVfsNode

Open() 공개 메소드

Opens the IVfsNode and returns an object capable of doing something smart with the IVfsNode.
This method is central to the entire VFS. It allows for interaction with file system entries in a way not possible with classical operating systems. The result of this function is heavily dependent on the item represented by the node, e.g. for a classic file (stream of bytes) the result of this method call would be a System.IO.Stream. For a device the result would be the driver object, for a directory it would be a System.IO.DirectoryInfo object, for kernel objects the respective object such as System.Threading.EventWaitHandle, System.Threading.Mutex, System.Threading.Thread, System.Diagnostics.Process etc. Note: The object retrieved can be closed by the respective methods on the returned object. There's no close functionality on the IVfsNode itself.
public Open ( FileAccess access, FileShare share ) : object
access FileAccess
share FileShare
리턴 object

VfsDirectory() 공개 메소드

Initializes a new instance of the VfsDirectory class.
public VfsDirectory ( IFileSystem fs, uint directoryCluster ) : System.IO
fs IFileSystem The fs.
directoryCluster uint The directory cluster.
리턴 System.IO

프로퍼티 상세

directoryCluster 보호되어 있는 프로퍼티

protected uint directoryCluster
리턴 uint