]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/helpers/core-utils.ts
Video blacklist refractoring
[github/Chocobozzz/PeerTube.git] / server / helpers / core-utils.ts
index 2ec7e6515fc82982e573d29e08438436b709e7e1..3118dc5007eca001c7722117e6620059db776747 100644 (file)
@@ -11,7 +11,9 @@ import {
   rename,
   unlink,
   writeFile,
-  access
+  access,
+  stat,
+  Stats
 } from 'fs'
 import * as mkdirp from 'mkdirp'
 import * as bcrypt from 'bcrypt'
@@ -92,6 +94,7 @@ const bcryptGenSaltPromise = promisify1<number, string>(bcrypt.genSalt)
 const bcryptHashPromise = promisify2<any, string|number, string>(bcrypt.hash)
 const createTorrentPromise = promisify2<string, any, any>(createTorrent)
 const rimrafPromise = promisify1WithVoid<string>(rimraf)
+const statPromise = promisify1<string, Stats>(stat)
 
 // ---------------------------------------------------------------------------
 
@@ -115,5 +118,6 @@ export {
   bcryptGenSaltPromise,
   bcryptHashPromise,
   createTorrentPromise,
-  rimrafPromise
+  rimrafPromise,
+  statPromise
 }