C# 클래스 NanoByte.Common.Storage.SlimDX.ContentManager

Provides a virtual file system for combining data from multiple directories and archives (useful for modding).
파일 보기 프로젝트 열기: nano-byte/common

공개 메소드들

메소드 설명
DeleteModFile ( [ type, [ id ) : void

Deletes a file in ModDir. Will not touch files in archives or in BaseDir.

FileExists ( [ type, [ id, bool searchArchives = true ) : bool

Checks whether a certain content file exists.

GetFileList ( [ type, [ extension ) : NamedCollection

Gets a list of all files of a certain type

GetFileStream ( [ type, [ id ) : Stream

Gets a reading stream for a content file (searches in archives)

LoadArchives ( ) : void

Loads any ArchiveFileExt archives in BaseDir and ModDir or specified by EnvVarNameBaseArchives or EnvVarNamerModArchives.

비공개 메소드들

메소드 설명
AddArchivesToList ( NamedCollection files, string type, string extension, ContentArchiveEntry>.IEnumerable archiveData, bool flagAsMod ) : void

Finds all files in archiveData ending with extension and adds them to the files collection

AddDirectoryToList ( NamedCollection files, string type, string extension, DirectoryInfo directory, string prefix, bool flagAsMod ) : void

Recursively finds all files in directory ending with extension and adds them to the files list.

AddEntry ( ContentArchiveEntry>.this dictionary, ZipEntry zipEntry, ZipFile zipFile ) : void
AddFileToList ( NamedCollection files, string type, string name, bool flagAsMod ) : void

Adds a specific file to the files list.

CloseArchives ( ) : void
CreateDirPath ( [ type ) : string
CreateFilePath ( [ type, [ id ) : string
GetFilePath ( [ type, [ id ) : string
LoadArchive ( string path, ContentArchiveEntry>.Dictionary archiveEntries ) : void

메소드 상세

DeleteModFile() 공개 정적인 메소드

Deletes a file in ModDir. Will not touch files in archives or in BaseDir.
is not set. The specified file could not be found. The specified file could not be deleted. You have insufficient rights to delete the file.
public static DeleteModFile ( [ type, [ id ) : void
type [ The type of file (e.g. Textures, Sounds, ...).
id [ The file name of the content.
리턴 void

FileExists() 공개 정적인 메소드

Checks whether a certain content file exists.
public static FileExists ( [ type, [ id, bool searchArchives = true ) : bool
type [ The type of file (e.g. Textures, Sounds, ...).
id [ The file name of the content.
searchArchives bool Whether to search for the file in archives as well.
리턴 bool

GetFileList() 공개 정적인 메소드

Gets a list of all files of a certain type
public static GetFileList ( [ type, [ extension ) : NamedCollection
type [ The type of files you want (e.g. Textures, Sounds, ...)
extension [ The file extension to so search for
리턴 NamedCollection

GetFileStream() 공개 정적인 메소드

Gets a reading stream for a content file (searches in archives)
The specified file could not be found. There was an error reading the file. Read access to the file is not permitted.
public static GetFileStream ( [ type, [ id ) : Stream
type [ The type of file (e.g. Textures, Sounds, ...).
id [ The file name of the content.
리턴 Stream

LoadArchives() 공개 정적인 메소드

Loads any ArchiveFileExt archives in BaseDir and ModDir or specified by EnvVarNameBaseArchives or EnvVarNamerModArchives.
public static LoadArchives ( ) : void
리턴 void