コード例 #1
0
        public void Dispose()
        {
            var error = SFile.CloseArchive(_handle);

            if (error.Bool)
            {
                throw new NotImplementedException();
            }
        }
コード例 #2
0
        public static Archive Open(string fileName, int priority, int flags)
        {
            IntPtr handle;
            var    error = SFile.OpenArchive(fileName, priority, flags, out handle);

            if (error.Bool)
            {
                throw new NotImplementedException();
            }

            return(new Archive(handle));
        }
コード例 #3
0
        public FileFound[] GetFiles(string mask = "*")
        {
            var res = new List <FileFound>();

            SFile.FileFoundData fileFoundData;
            var findHandle = SFile.FindFirstFile(_handle, mask, out fileFoundData, null);

            if (findHandle == null)
            {
                throw new NotImplementedException();
            }

            do
            {
                res.Add(new FileFound(fileFoundData));
            } while (SFile.FindNextFile(findHandle, out fileFoundData).Bool);

            if (SFile.FindClose(findHandle).Bool)
            {
                throw new NotImplementedException();
            }

            return(res.ToArray());
        }