Marathon.IO.FileBase.Load(System.IO.Stream)

Here are the examples of the csharp api Marathon.IO.FileBase.Load(System.IO.Stream) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1 Examples 7

19 Source : FileBase.cs
with MIT License
from Big-Endian-32

public virtual void Load(string file)
        {
            // The file path was null...
            if (string.IsNullOrEmpty(file))
                throw new ArgumentNullException(nameof(file));

            // The file doesn't exist...
            if (!File.Exists(file))
                throw new FileNotFoundException("The specified file doesn't exist...", file);

            // Set loaded location.
            Location = file;

            // Open the file and read without complete handle ownership.
            FileStream = new FileStream(file, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);

            // Call load function.
            Load(FileStream);
        }