Exemple #1
0
        public void SetFile(string file)
        {
            FileInfo fileInfo = new FileInfo(file);

            OverwrittenFilePath = file;
            TimeStamp           = fileInfo.LastWriteTime;
            Offset           = 0;
            CompressedSize   = (ulong)fileInfo.Length;
            UncompressedSize = (ulong)fileInfo.Length;
            FileStream fileStream = RDAFileStreamCache.Open(file);

            if (fileStream == null)
            {
                return;
            }
            BinaryFile = new BinaryReader(fileStream);
        }
Exemple #2
0
        public static RDAFile Create(FileHeader.Version version, string file, string folderpath)
        {
            FileInfo fileInfo = new FileInfo(file);
            RDAFile  rdaFile  = new RDAFile();

            rdaFile.FileName            = FileNameToRDAFileName(file, folderpath);
            rdaFile.Version             = version;
            rdaFile.OverwrittenFilePath = file;
            rdaFile.TimeStamp           = fileInfo.LastWriteTime;
            rdaFile.Offset           = 0;
            rdaFile.CompressedSize   = (ulong)fileInfo.Length;
            rdaFile.UncompressedSize = (ulong)fileInfo.Length;
            FileStream fileStream = RDAFileStreamCache.Open(file);

            if (fileStream == null)
            {
                return(null);
            }
            rdaFile.BinaryFile = new BinaryReader(fileStream);
            return(rdaFile);
        }