From c4b607804bee60db1e8084e23ccb283397f0c92d Mon Sep 17 00:00:00 2001 From: Book Pauk Date: Sun, 27 Oct 2019 19:19:20 +0700 Subject: [PATCH] =?UTF-8?q?=D0=97=D0=B0=D0=B3=D0=BE=D1=82=D0=BE=D0=B2?= =?UTF-8?q?=D0=BA=D0=B0=20LibSharedStorage?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/core/LibSharedStorage/index.js | 54 --------------------------- 1 file changed, 54 deletions(-) diff --git a/server/core/LibSharedStorage/index.js b/server/core/LibSharedStorage/index.js index 5178941a..6cf772b6 100644 --- a/server/core/LibSharedStorage/index.js +++ b/server/core/LibSharedStorage/index.js @@ -1,58 +1,4 @@ -const fs = require('fs-extra'); -const crypto = require('crypto'); - -const utils = require('../utils'); - class LibSharedStorage { - constructor() { - this.readingFiles = false; - } - - async init(config) { - this.config = config; - this.lssDir = `${config.sharedDir}/lss`; - await fs.ensureDir(this.lssDir); - } - - storageNameToPath(storageFilename) { - if (storageFilename.length < 4) - throw new Error('LibSharedStorage: ошибка в имени файла'); - return `${storageFilename.substr(0, 2)}/${storageFilename.substr(2, 2)}/${storageFilename}`; - } - - async filenameToStoragePath(filename) { - const base36hash = utils.toBase36(await utils.getFileHash(filename, 'sha1')); - } - - async checkFile(filename) { - } - - async addFile(filename, desc) { - } - - async addFileFromArchive(archiveFilename, deompFiles, desc) { - } - - async updateFileDesc(storagePath, desc) { - } - - async getAuthorPath(authorName) { - } - - async checkAuthor(authorName) { - } - - async addAuthor(authorName, desc) { - } - - async readFiles(callback) { - } - - async stopReadFiles() { - } - - async getFilesStatistic() { - } } module.exports = LibSharedStorage; \ No newline at end of file