fNbt.NbtFile.LoadFromFile C# (CSharp) Method

LoadFromFile() public method

Loads NBT data from a file. Existing RootTag will be replaced. Compression will be auto-detected.
is null. If given file was not found. If file ended earlier than expected. If file compression could not be detected, or decompressing failed. If an error occurred while parsing data in NBT format. If an I/O error occurred while reading the file.
public LoadFromFile ( [ fileName ) : long
fileName [ Name of the file from which data will be loaded.
return long
        public long LoadFromFile([NotNull] string fileName)
        {
            return LoadFromFile(fileName, NbtCompression.AutoDetect, null);
        }

Same methods

NbtFile::LoadFromFile ( [ fileName, NbtCompression compression, [ selector ) : long

Usage Example

Ejemplo n.º 1
0
 public Map LoadHeader( string fileName ) {
     if( fileName == null ) throw new ArgumentNullException( "fileName" );
     NbtFile file = new NbtFile();
     file.LoadFromFile( fileName, NbtCompression.None, HeaderTagSelector );
     NbtCompound root = file.RootTag;
     return LoadHeaderInternal( root );
 }
All Usage Examples Of fNbt.NbtFile::LoadFromFile