コード例 #1
0
ファイル: LocalDatabase.cs プロジェクト: dronab/InnerDb
        public LocalDatabase(string databaseName)
        {
            this.databaseName = databaseName.SantizeForDatabaseName();

            string archiveName = GetDatabaseFileName(databaseName);

            if (File.Exists(archiveName))
            {
                GzipHelper.DecompressFiles(archiveName);
                File.Delete(archiveName);
            }

            indexStore  = new IndexStore(databaseName);
            fileStore   = new FileDataStore(databaseName, indexStore);
            journal     = new FileJournal(databaseName, fileStore);
            memoryStore = new InMemoryDataStore(fileStore, journal.DirectoryPath);
        }