Пример #1
0
        public bool Build(string outputDir, string fileName)
        {
            var builder = new FileHashDatabaseBuilder
                          (
                folder: m_dataSourcePath,
                pattern: new string[]
            {
                "(.*?).awb$", "(.*?).acb$",
            }
                          );

            if (!Directory.Exists(outputDir))
            {
                Directory.CreateDirectory(outputDir);
            }
            var outputPath   = Path.Combine(outputDir, fileName);
            var fileHashList = builder.Build();
            var table        = CreateTable(fileHashList);
            var isWriteTable = SoundFileDatabase.Write(outputPath, table);

            if (!isWriteTable)
            {
                return(false);
            }

            return(DoPostBuild(outputDir, fileHashList, SoundFileDatabase.Read(outputPath)));
        }
Пример #2
0
        public bool Build(string directoryPath, string fileName)
        {
            if (!Directory.Exists(directoryPath))
            {
                Directory.CreateDirectory(directoryPath);
            }

            // ハッシュ値
            var builder = new FileHashDatabaseBuilder
                          (
                folder: directoryPath,
                pattern: new string[]
            {
                "(.*?).usm$",
            }
                          );
            var outputPath   = Path.Combine(directoryPath, fileName);
            var fileHashList = builder.Build();
            var table        = CreateTable(fileHashList);

            return(MovieFileDatabase.Write(outputPath, table));
        }