C# Class VirtualFileSystem.INode

Afficher le fichier Open project: SummerWish/vfs Class Usage Examples

Méthodes publiques

Свойство Type Description
data _INode
index System.UInt32

Méthodes publiques

Méthode Description
Create ( VFSCore vfs, UInt32 index, UInt32 flags, UInt32 owner ) : INode

创建一个新的 inode

GetBlockAtPosition ( UInt32 position, System.Boolean allocate = false ) : Block

查找指定偏移所在的块,若块不存在则返回无效块

GetBlocksToPreserve ( UInt32 nBlock ) : UInt32

返回当该 inode 总计要预留若干数据块时,还需要申请预留多少数据块

GetPosition ( ) : UInt32
GetPosition ( VFSCore vfs, UInt32 index ) : UInt32
INode ( VFSCore vfs, _INode data, UInt32 index = UInt32.MaxValue ) : System
IsDirectory ( ) : System.Boolean

该 inode 是否是一个目录

Load ( VFSCore vfs, UInt32 index ) : INode

从存储介质中获取 inode

PrepareBlockAtPosition ( UInt32 position ) : Block

查找指定偏移所在的块,若块不存在则创建

Read ( ) : byte[]

读取所有数据

Read ( UInt32 position, byte arr, UInt32 count ) : void

读取数据

Resize ( UInt32 newSize ) : void

修改并释放数据占用空间,删除第 newSize 字节开始直到原文件大小的数据块

Save ( ) : void

将 inode 数据写入存储介质

Size ( ) : UInt32

返回 inode 数据区大小

Write ( UInt32 position, byte arr ) : void

写入数据

Write ( byte arr ) : void

写入数据作为 inode 数据,释放未使用的数据块

Method Details

Create() public static méthode

创建一个新的 inode
public static Create ( VFSCore vfs, UInt32 index, UInt32 flags, UInt32 owner ) : INode
vfs VFSCore
index System.UInt32
flags System.UInt32
owner System.UInt32
Résultat INode

GetBlockAtPosition() public méthode

查找指定偏移所在的块,若块不存在则返回无效块
public GetBlockAtPosition ( UInt32 position, System.Boolean allocate = false ) : Block
position System.UInt32
allocate System.Boolean
Résultat Block

GetBlocksToPreserve() public méthode

返回当该 inode 总计要预留若干数据块时,还需要申请预留多少数据块
public GetBlocksToPreserve ( UInt32 nBlock ) : UInt32
nBlock System.UInt32
Résultat System.UInt32

GetPosition() public méthode

public GetPosition ( ) : UInt32
Résultat System.UInt32

GetPosition() public static méthode

public static GetPosition ( VFSCore vfs, UInt32 index ) : UInt32
vfs VFSCore
index System.UInt32
Résultat System.UInt32

INode() public méthode

public INode ( VFSCore vfs, _INode data, UInt32 index = UInt32.MaxValue ) : System
vfs VFSCore
data _INode
index System.UInt32
Résultat System

IsDirectory() public méthode

该 inode 是否是一个目录
public IsDirectory ( ) : System.Boolean
Résultat System.Boolean

Load() public static méthode

从存储介质中获取 inode
public static Load ( VFSCore vfs, UInt32 index ) : INode
vfs VFSCore
index System.UInt32
Résultat INode

PrepareBlockAtPosition() public méthode

查找指定偏移所在的块,若块不存在则创建
public PrepareBlockAtPosition ( UInt32 position ) : Block
position System.UInt32
Résultat Block

Read() public méthode

读取所有数据
public Read ( ) : byte[]
Résultat byte[]

Read() public méthode

读取数据
public Read ( UInt32 position, byte arr, UInt32 count ) : void
position System.UInt32
arr byte
count System.UInt32
Résultat void

Resize() public méthode

修改并释放数据占用空间,删除第 newSize 字节开始直到原文件大小的数据块
public Resize ( UInt32 newSize ) : void
newSize System.UInt32
Résultat void

Save() public méthode

将 inode 数据写入存储介质
public Save ( ) : void
Résultat void

Size() public méthode

返回 inode 数据区大小
public Size ( ) : UInt32
Résultat System.UInt32

Write() public méthode

写入数据
public Write ( UInt32 position, byte arr ) : void
position System.UInt32
arr byte
Résultat void

Write() public méthode

写入数据作为 inode 数据,释放未使用的数据块
public Write ( byte arr ) : void
arr byte
Résultat void

Property Details

data public_oe property

可持久化数据
public _INode,VirtualFileSystem data
Résultat _INode

index public_oe property

该 inode 编号
public UInt32,System index
Résultat System.UInt32