C# Class AdvancedLauncher.SDK.Management.FileSystemManager

The DMO File System manager
Inheritance: CrossDomainObject, IFileSystemManager
Afficher le fichier Open project: GoldRenard/DMOAdvancedLauncher

Private Properties

Свойство Type Description
ConvertToUint32 uint
GetEntryIndex int
OnFileWrited void
ReadFile Stream
WriteMapFile bool
_WriteStream bool

Méthodes publiques

Méthode Description
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.

Méthodes protégées

Méthode Description
Dispose ( bool disposing ) : void

Object dispose method

Private Methods

Méthode Description
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.

Method Details

Close() public méthode

Closes game archive
public Close ( ) : void
Résultat void

Dispose() public méthode

Object dispose method
public Dispose ( ) : void
Résultat void

Dispose() protected méthode

Object dispose method
protected Dispose ( bool disposing ) : void
disposing bool True for managed resources
Résultat void

FileHash() public méthode

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
Résultat uint

FileSystemManager() public méthode

Base constructor
public FileSystemManager ( ) : System
Résultat System

FileSystemManager() public méthode

Constructon with UI Dispatcher to invoke the events.
public FileSystemManager ( Dispatcher OwnerDispatcher ) : System
OwnerDispatcher System.Windows.Threading.Dispatcher UI Dispatcher
Résultat System

Initialize() public méthode

API initialization method
public Initialize ( ) : void
Résultat void

Initialize() public méthode

Initializes with specified ILogManager for logging
public Initialize ( ILogManager logManager ) : void
logManager ILogManager The interface
Résultat void

IsFileLocked() public static méthode

Checks access to file
public static IsFileLocked ( string file ) : bool
file string Full path to file
Résultat bool

Open() public méthode

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
Résultat bool

ReadFile() public méthode

Reads file by name
public ReadFile ( string name ) : Stream
name string File name
Résultat Stream

ReadFile() public méthode

Reads file by id
public ReadFile ( uint id ) : Stream
id uint File id
Résultat Stream

WriteDirectory() public méthode

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.
Résultat bool

WriteFile() public méthode

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)
Résultat bool

WriteStream() public méthode

Writes stream to archive.
public WriteStream ( Stream sourceStream, string destination ) : bool
sourceStream Stream Source stream
destination string Destination file (internal file path inside archive)
Résultat bool

WriteStream() public méthode

Writes stream to archive.
public WriteStream ( Stream sourceStream, uint entryId ) : bool
sourceStream Stream Source stream
entryId uint ID of destination file
Résultat bool