C# Класс AdvancedLauncher.SDK.Management.FileSystemManager

The DMO File System manager
Наследование: CrossDomainObject, IFileSystemManager
Показать файл Открыть проект

Private Properties

Свойство Тип Описание
ConvertToUint32 uint
GetEntryIndex int
OnFileWrited void
ReadFile Stream
WriteMapFile bool
_WriteStream bool

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

Метод Описание
Close ( ) : void

Closes game archive

Dispose ( ) : void

Object dispose method

FileHash ( string filePath ) : uint

Calculates file hash (internal file ID). Is is hash function over the game path (not the file itself).

FileSystemManager ( ) : System

Base constructor

FileSystemManager ( Dispatcher OwnerDispatcher ) : System

Constructon with UI Dispatcher to invoke the events.

Initialize ( ) : void

API initialization method

Initialize ( ILogManager logManager ) : void

Initializes with specified ILogManager for logging

IsFileLocked ( string file ) : bool

Checks access to file

Open ( FileAccess access, int archiveHeader, string headerFile, string packageFile ) : bool

Opens game archives

ReadFile ( string name ) : Stream

Reads file by name

ReadFile ( uint id ) : Stream

Reads file by id

WriteDirectory ( string path, bool deleteOnComplete ) : bool

Writes the full directory content into game archive

WriteFile ( string sourceFile, string destination ) : bool

Writes file to archive.

WriteStream ( Stream sourceStream, string destination ) : bool

Writes stream to archive.

WriteStream ( Stream sourceStream, uint entryId ) : bool

Writes stream to archive.

Защищенные методы

Метод Описание
Dispose ( bool disposing ) : void

Object dispose method

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

Метод Описание
ConvertToUint32 ( long l ) : uint

Convert long to uint

GetEntryIndex ( uint fileId ) : int

Get internal entry index

OnFileWrited ( int fileNum, int fileCount ) : void
ReadFile ( int entryIndex ) : Stream

Reads file by entry index

WriteMapFile ( ) : bool

Writes map file (header file)

_WriteStream ( Stream SourceStream, uint entryId ) : bool

Writes stream to archive.

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

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

Closes game archive
public Close ( ) : void
Результат void

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

Object dispose method
public Dispose ( ) : void
Результат void

Dispose() защищенный Метод

Object dispose method
protected Dispose ( bool disposing ) : void
disposing bool True for managed resources
Результат void

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

Calculates file hash (internal file ID). Is is hash function over the game path (not the file itself).
public FileHash ( string filePath ) : uint
filePath string File path
Результат uint

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

Base constructor
public FileSystemManager ( ) : System
Результат System

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

Constructon with UI Dispatcher to invoke the events.
public FileSystemManager ( Dispatcher OwnerDispatcher ) : System
OwnerDispatcher System.Windows.Threading.Dispatcher UI Dispatcher
Результат System

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

API initialization method
public Initialize ( ) : void
Результат void

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

Initializes with specified ILogManager for logging
public Initialize ( ILogManager logManager ) : void
logManager ILogManager The interface
Результат void

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

Checks access to file
public static IsFileLocked ( string file ) : bool
file string Full path to file
Результат bool

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

Opens game archives
public Open ( FileAccess access, int archiveHeader, string headerFile, string packageFile ) : bool
access FileAccess File access mode.
archiveHeader int Archives header number. Usually it is 16 for common game archive
headerFile string Header file path
packageFile string Packages file path
Результат bool

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

Reads file by name
public ReadFile ( string name ) : Stream
name string File name
Результат Stream

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

Reads file by id
public ReadFile ( uint id ) : Stream
id uint File id
Результат Stream

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

Writes the full directory content into game archive
public WriteDirectory ( string path, bool deleteOnComplete ) : bool
path string Directory path
deleteOnComplete bool Set True of you want delete this directory awter write.
Результат bool

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

Writes file to archive.
public WriteFile ( string sourceFile, string destination ) : bool
sourceFile string Source file (physical on the disk)
destination string Destination file (internal file path inside archive)
Результат bool

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

Writes stream to archive.
public WriteStream ( Stream sourceStream, string destination ) : bool
sourceStream Stream Source stream
destination string Destination file (internal file path inside archive)
Результат bool

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

Writes stream to archive.
public WriteStream ( Stream sourceStream, uint entryId ) : bool
sourceStream Stream Source stream
entryId uint ID of destination file
Результат bool