diff options
Diffstat (limited to 'server/helpers/core-utils.ts')
-rw-r--r-- | server/helpers/core-utils.ts | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/server/helpers/core-utils.ts b/server/helpers/core-utils.ts index 2ec7e6515..3118dc500 100644 --- a/server/helpers/core-utils.ts +++ b/server/helpers/core-utils.ts | |||
@@ -11,7 +11,9 @@ import { | |||
11 | rename, | 11 | rename, |
12 | unlink, | 12 | unlink, |
13 | writeFile, | 13 | writeFile, |
14 | access | 14 | access, |
15 | stat, | ||
16 | Stats | ||
15 | } from 'fs' | 17 | } from 'fs' |
16 | import * as mkdirp from 'mkdirp' | 18 | import * as mkdirp from 'mkdirp' |
17 | import * as bcrypt from 'bcrypt' | 19 | import * as bcrypt from 'bcrypt' |
@@ -92,6 +94,7 @@ const bcryptGenSaltPromise = promisify1<number, string>(bcrypt.genSalt) | |||
92 | const bcryptHashPromise = promisify2<any, string|number, string>(bcrypt.hash) | 94 | const bcryptHashPromise = promisify2<any, string|number, string>(bcrypt.hash) |
93 | const createTorrentPromise = promisify2<string, any, any>(createTorrent) | 95 | const createTorrentPromise = promisify2<string, any, any>(createTorrent) |
94 | const rimrafPromise = promisify1WithVoid<string>(rimraf) | 96 | const rimrafPromise = promisify1WithVoid<string>(rimraf) |
97 | const statPromise = promisify1<string, Stats>(stat) | ||
95 | 98 | ||
96 | // --------------------------------------------------------------------------- | 99 | // --------------------------------------------------------------------------- |
97 | 100 | ||
@@ -115,5 +118,6 @@ export { | |||
115 | bcryptGenSaltPromise, | 118 | bcryptGenSaltPromise, |
116 | bcryptHashPromise, | 119 | bcryptHashPromise, |
117 | createTorrentPromise, | 120 | createTorrentPromise, |
118 | rimrafPromise | 121 | rimrafPromise, |
122 | statPromise | ||
119 | } | 123 | } |