diff options
author | Florent Fayolle <florent.fayolle69@gmail.com> | 2018-06-02 21:39:41 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-06-07 08:57:48 +0200 |
commit | 0138af9237b77dd7d3a49260d164193b4048de84 (patch) | |
tree | 5a377c7577cd99d5b324967187e10cd9fcc81383 /server/helpers | |
parent | 157b62b1f4450c32bb7383ccacbea555ec607013 (diff) | |
download | PeerTube-0138af9237b77dd7d3a49260d164193b4048de84.tar.gz PeerTube-0138af9237b77dd7d3a49260d164193b4048de84.tar.zst PeerTube-0138af9237b77dd7d3a49260d164193b4048de84.zip |
Add create-import-video-file-job command
Diffstat (limited to 'server/helpers')
-rw-r--r-- | server/helpers/core-utils.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/server/helpers/core-utils.ts b/server/helpers/core-utils.ts index a3dfe27b5..c560222d3 100644 --- a/server/helpers/core-utils.ts +++ b/server/helpers/core-utils.ts | |||
@@ -6,7 +6,7 @@ | |||
6 | import * as bcrypt from 'bcrypt' | 6 | import * as bcrypt from 'bcrypt' |
7 | import * as createTorrent from 'create-torrent' | 7 | import * as createTorrent from 'create-torrent' |
8 | import { pseudoRandomBytes } from 'crypto' | 8 | import { pseudoRandomBytes } from 'crypto' |
9 | import { readdir, readFile, rename, stat, Stats, unlink, writeFile } from 'fs' | 9 | import { copyFile, readdir, readFile, rename, stat, Stats, unlink, writeFile } from 'fs' |
10 | import * as mkdirp from 'mkdirp' | 10 | import * as mkdirp from 'mkdirp' |
11 | import { isAbsolute, join } from 'path' | 11 | import { isAbsolute, join } from 'path' |
12 | import * as pem from 'pem' | 12 | import * as pem from 'pem' |
@@ -136,6 +136,7 @@ function promisify2WithVoid<T, U> (func: (arg1: T, arg2: U, cb: (err: any) => vo | |||
136 | } | 136 | } |
137 | } | 137 | } |
138 | 138 | ||
139 | const copyFilePromise = promisify2WithVoid<string, string>(copyFile) | ||
139 | const readFileBufferPromise = promisify1<string, Buffer>(readFile) | 140 | const readFileBufferPromise = promisify1<string, Buffer>(readFile) |
140 | const unlinkPromise = promisify1WithVoid<string>(unlink) | 141 | const unlinkPromise = promisify1WithVoid<string>(unlink) |
141 | const renamePromise = promisify2WithVoid<string, string>(rename) | 142 | const renamePromise = promisify2WithVoid<string, string>(rename) |
@@ -167,6 +168,7 @@ export { | |||
167 | promisify0, | 168 | promisify0, |
168 | promisify1, | 169 | promisify1, |
169 | 170 | ||
171 | copyFilePromise, | ||
170 | readdirPromise, | 172 | readdirPromise, |
171 | readFileBufferPromise, | 173 | readFileBufferPromise, |
172 | unlinkPromise, | 174 | unlinkPromise, |