public MonoGameOutputStream(MonoGameFileHandle fileHandle, bool append)
        {
            if (!fileHandle.exists() || fileHandle.isDirectory())
            {
                throw new IOException();
            }
            var fileInfo = new FileInfo(fileHandle.pathWithPrefix());

            _stream = append ? fileInfo.Open(FileMode.Append, FileAccess.Write) : fileInfo.Create();
        }
        public MonoGameInputStream(MonoGameFileHandle fileHandle)
        {
            if (!fileHandle.exists() || fileHandle.isDirectory())
            {
                throw new IOException();
            }

            var fileInfo = new FileInfo(fileHandle.fullPath());

            _stream = fileInfo.OpenRead();
        }
Exemple #3
0
        public MonoGameInputStream(MonoGameFileHandle fileHandle)
        {
            base._init_();
            if (!fileHandle.exists() || fileHandle.isDirectory())
            {
                throw new IOException();
            }

            var fileInfo = new FileInfo(fileHandle.pathWithPrefix());

            _stream = fileInfo.OpenRead();
        }