public static IntPtr OpenWrite(string filename, PhysFS physFS)
            {
                var val = Interop.PHYSFS_openWrite(filename);

                if (val == null)
                {
                    throw new PhysFSException(physFS);
                }
                return(val);
            }
            public static void SetBuffer(IntPtr file, ulong bufSize, PhysFS physFS)
            {
                int err = Interop.PHYSFS_setBuffer(file, bufSize);

                physFS.ThrowException(err);
            }
            public static void Seek(IntPtr file, ulong pos, PhysFS physFS)
            {
                int err = Interop.PHYSFS_seek(file, pos);

                physFS.ThrowException(err);
            }
            public static void Close(IntPtr file, PhysFS physFS)
            {
                int err = Interop.PHYSFS_close(file);

                physFS.ThrowException(err);
            }
            public static void Flush(IntPtr file, PhysFS physFS)
            {
                int err = Interop.PHYSFS_flush(file);

                physFS.ThrowException(err);
            }
 public PhysFSException(PhysFS physFS)
     : base(physFS.GetLastError())
 {
 }
Beispiel #7
0
 internal PhysFSStream(PhysFS pfs, IntPtr ptr, bool readOnly)
 {
     handle        = ptr;
     this.readOnly = readOnly;
     physFS        = pfs;
 }