|
TModLoader v1.4.4.9
TModLoader source code documentation
|
Inheritance diagram for Terraria.ModLoader.Core.TmodFile:
Collaboration diagram for Terraria.ModLoader.Core.TmodFile:Classes | |
| class | DisposeWrapper |
| class | FileEntry |
Public Member Functions | |
| bool | HasFile (string fileName) |
| byte[] | GetBytes (FileEntry entry) |
| List< string > | GetFileNames () |
| byte[] | GetBytes (string fileName) |
| Stream | GetStream (FileEntry entry, bool newFileStream=false) |
| Stream | GetStream (string fileName, bool newFileStream=false) |
| IEnumerator< FileEntry > | GetEnumerator () |
| IDisposable | Open () |
| void | CacheFiles (ISet< string > skip=null) |
| void | RemoveFromCache (IEnumerable< string > fileNames) |
| void | ResetCache () |
Public Attributes | |
| readonly string | path |
Static Public Attributes | |
| const uint | MIN_COMPRESS_SIZE = 1024u |
| const uint | MAX_CACHE_SIZE = 131072u |
| const float | COMPRESSION_TRADEOFF = 0.9f |
Package Functions | |
| TmodFile (string path, string name=null, Version version=null) | |
| void | OnStreamClosed (EntryReadStream stream) |
| void | AddFile (string fileName, byte[] data) |
| Adds a (fileName -> content) entry to the compressed payload This method is not threadsafe with reads, but is threadsafe with multiple concurrent AddFile calls. | |
| void | RemoveFile (string fileName) |
| void | Save () |
Properties | |
| Version | TModLoaderVersion [get, private set] |
| string | Name [get, private set] |
| Version | Version [get, private set] |
| byte[] | Hash [get, private set] |
| byte[] | Signature = new byte[256] [get, private set] |
| bool | ValidModBrowserSignature [get] |
| int | Count [get] |
| bool | IsOpen [get] |
Private Member Functions | |
| IEnumerator IEnumerable. | GetEnumerator () |
| void | Close () |
| void | Read () |
| void | Reopen () |
| void | Upgrade () |
Static Private Member Functions | |
| static string | Sanitize (string path) |
| static bool | ShouldCompress (string fileName) |
Private Attributes | |
| FileStream | fileStream |
| IDictionary< string, FileEntry > | files = new Dictionary<string, FileEntry>() |
| FileEntry[] | fileTable |
| int | openCounter |
| EntryReadStream | sharedEntryReadStream |
| List< EntryReadStream > | independentEntryReadStreams = new List<EntryReadStream>() |
| bool? | validModBrowserSignature |
Definition at line 15 of file TmodFile.cs.