@types/fs-extra
Advanced tools
Comparing version 9.0.1 to 9.0.2
@@ -11,2 +11,3 @@ // Type definitions for fs-extra 9.0 | ||
// Piotr Błażejewicz <https://github.com/peterblazejewicz> | ||
// Tiger Oakes <https://github.com/NotWoods> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
@@ -18,2 +19,3 @@ | ||
import Stats = fs.Stats; | ||
import PathLike = fs.PathLike; | ||
@@ -121,16 +123,16 @@ export * from "fs"; | ||
export function access(path: string | Buffer, callback: (err: NodeJS.ErrnoException) => void): void; | ||
export function access(path: string | Buffer, mode: number, callback: (err: NodeJS.ErrnoException) => void): void; | ||
export function access(path: string | Buffer, mode?: number): Promise<void>; | ||
export function access(path: PathLike, callback: (err: NodeJS.ErrnoException) => void): void; | ||
export function access(path: PathLike, mode: number, callback: (err: NodeJS.ErrnoException) => void): void; | ||
export function access(path: PathLike, mode?: number): Promise<void>; | ||
export function appendFile(file: string | Buffer | number, data: any, options: { encoding?: string; mode?: number | string; flag?: string; }, | ||
export function appendFile(file: PathLike | number, data: any, options: { encoding?: string; mode?: number | string; flag?: string; }, | ||
callback: (err: NodeJS.ErrnoException) => void): void; | ||
export function appendFile(file: string | Buffer | number, data: any, callback: (err: NodeJS.ErrnoException) => void): void; | ||
export function appendFile(file: string | Buffer | number, data: any, options?: { encoding?: string; mode?: number | string; flag?: string; }): Promise<void>; | ||
export function appendFile(file: PathLike | number, data: any, callback: (err: NodeJS.ErrnoException) => void): void; | ||
export function appendFile(file: PathLike | number, data: any, options?: { encoding?: string; mode?: number | string; flag?: string; }): Promise<void>; | ||
export function chmod(path: string | Buffer, mode: string | number, callback: (err: NodeJS.ErrnoException) => void): void; | ||
export function chmod(path: string | Buffer, mode: string | number): Promise<void>; | ||
export function chmod(path: PathLike, mode: Mode, callback: (err: NodeJS.ErrnoException) => void): void; | ||
export function chmod(path: PathLike, mode: Mode): Promise<void>; | ||
export function chown(path: string | Buffer, uid: number, gid: number): Promise<void>; | ||
export function chown(path: string | Buffer, uid: number, gid: number, callback: (err: NodeJS.ErrnoException) => void): void; | ||
export function chown(path: PathLike, uid: number, gid: number): Promise<void>; | ||
export function chown(path: PathLike, uid: number, gid: number, callback: (err: NodeJS.ErrnoException) => void): void; | ||
@@ -140,4 +142,4 @@ export function close(fd: number, callback: (err: NodeJS.ErrnoException) => void): void; | ||
export function fchmod(fd: number, mode: string | number, callback: (err: NodeJS.ErrnoException) => void): void; | ||
export function fchmod(fd: number, mode: string | number): Promise<void>; | ||
export function fchmod(fd: number, mode: Mode, callback: (err: NodeJS.ErrnoException) => void): void; | ||
export function fchmod(fd: number, mode: Mode): Promise<void>; | ||
@@ -165,10 +167,10 @@ export function fchown(fd: number, uid: number, gid: number, callback: (err: NodeJS.ErrnoException) => void): void; | ||
export function lchown(path: string | Buffer, uid: number, gid: number, callback: (err: NodeJS.ErrnoException) => void): void; | ||
export function lchown(path: string | Buffer, uid: number, gid: number): Promise<void>; | ||
export function lchown(path: PathLike, uid: number, gid: number, callback: (err: NodeJS.ErrnoException) => void): void; | ||
export function lchown(path: PathLike, uid: number, gid: number): Promise<void>; | ||
export function link(srcpath: string | Buffer, dstpath: string | Buffer, callback: (err: NodeJS.ErrnoException) => void): void; | ||
export function link(srcpath: string | Buffer, dstpath: string | Buffer): Promise<void>; | ||
export function link(existingPath: PathLike, newPath: PathLike, callback: (err: NodeJS.ErrnoException) => void): void; | ||
export function link(existingPath: PathLike, newPath: PathLike): Promise<void>; | ||
export function lstat(path: string | Buffer, callback: (err: NodeJS.ErrnoException, stats: Stats) => any): void; | ||
export function lstat(path: string | Buffer): Promise<Stats>; | ||
export function lstat(path: PathLike, callback: (err: NodeJS.ErrnoException, stats: Stats) => any): void; | ||
export function lstat(path: PathLike): Promise<Stats>; | ||
@@ -180,3 +182,3 @@ /** | ||
*/ | ||
export function mkdir(path: string | Buffer, callback: (err: NodeJS.ErrnoException) => void): void; | ||
export function mkdir(path: PathLike, callback: (err: NodeJS.ErrnoException) => void): void; | ||
/** | ||
@@ -187,8 +189,8 @@ * Asynchronous mkdir - creates the directory specified in {path}. Parameter {mode} defaults to 0777. | ||
*/ | ||
export function mkdir(path: string | Buffer, mode: number | string, callback: (err: NodeJS.ErrnoException) => void): void; | ||
export function mkdir(path: string | Buffer): Promise<void>; | ||
export function mkdir(path: PathLike, options: Mode | fs.MakeDirectoryOptions | null, callback: (err: NodeJS.ErrnoException) => void): void; | ||
export function mkdir(path: PathLike): Promise<void>; | ||
export function open(path: string | Buffer, flags: string | number, callback: (err: NodeJS.ErrnoException, fd: number) => void): void; | ||
export function open(path: string | Buffer, flags: string | number, mode: number, callback: (err: NodeJS.ErrnoException, fd: number) => void): void; | ||
export function open(path: string | Buffer, flags: string | number, mode?: number): Promise<number>; | ||
export function open(path: PathLike, flags: string | number, callback: (err: NodeJS.ErrnoException, fd: number) => void): void; | ||
export function open(path: PathLike, flags: string | number, mode: Mode, callback: (err: NodeJS.ErrnoException, fd: number) => void): void; | ||
export function open(path: PathLike, flags: string | number, mode?: Mode | null): Promise<number>; | ||
@@ -203,26 +205,29 @@ export function opendir(path: string, cb: (err: NodeJS.ErrnoException | null, dir: fs.Dir) => void): void; | ||
export function read(fd: number, buffer: Buffer, offset: number, length: number, position: number | null, | ||
callback: (err: NodeJS.ErrnoException, bytesRead: number, buffer: Buffer) => void): void; | ||
export function read(fd: number, buffer: Buffer, offset: number, length: number, position: number | null): Promise<ReadResult>; | ||
export function read<TBuffer extends ArrayBufferView>(fd: number, buffer: TBuffer, offset: number, length: number, position: number | null, | ||
callback: (err: NodeJS.ErrnoException, bytesRead: number, buffer: TBuffer) => void): void; | ||
export function read<TBuffer extends ArrayBufferView>(fd: number, buffer: TBuffer, offset: number, length: number, position: number | null): Promise<{ bytesRead: number, buffer: TBuffer }>; | ||
export function readFile(file: string | Buffer | number, callback: (err: NodeJS.ErrnoException, data: Buffer) => void): void; | ||
export function readFile(file: string | Buffer | number, encoding: string, callback: (err: NodeJS.ErrnoException, data: string) => void): void; | ||
export function readFile(file: string | Buffer | number, options: { flag?: string; } | { encoding: string; flag?: string; }, callback: (err: NodeJS.ErrnoException, data: Buffer) => void): void; | ||
export function readFile(file: string | Buffer | number, options: { flag?: string; } | { encoding: string; flag?: string; }): Promise<string>; | ||
export function readFile(file: PathLike | number, callback: (err: NodeJS.ErrnoException, data: Buffer) => void): void; | ||
export function readFile(file: PathLike | number, encoding: string, callback: (err: NodeJS.ErrnoException, data: string) => void): void; | ||
export function readFile(file: PathLike | number, options: { flag?: string; } | { encoding: string; flag?: string; }, callback: (err: NodeJS.ErrnoException, data: Buffer) => void): void; | ||
export function readFile(file: PathLike | number, options: { flag?: string; } | { encoding: string; flag?: string; }): Promise<string>; | ||
// tslint:disable-next-line:unified-signatures | ||
export function readFile(file: string | Buffer | number, encoding: string): Promise<string>; | ||
export function readFile(file: string | Buffer | number): Promise<Buffer>; | ||
export function readFile(file: PathLike | number, encoding: string): Promise<string>; | ||
export function readFile(file: PathLike | number): Promise<Buffer>; | ||
export function readdir(path: string | Buffer, callback: (err: NodeJS.ErrnoException, files: string[]) => void): void; | ||
export function readdir(path: string | Buffer): Promise<string[]>; | ||
export function readdir(path: PathLike, callback: (err: NodeJS.ErrnoException, files: string[]) => void): void; | ||
export function readdir(path: PathLike, options?: { encoding: BufferEncoding | null; withFileTypes?: false } | BufferEncoding | null): Promise<string[]>; | ||
export function readdir(path: PathLike, options: "buffer" | { encoding: "buffer"; withFileTypes?: false }): Promise<Buffer[]>; | ||
export function readdir(path: PathLike, options?: { encoding?: string | null; withFileTypes?: false }): Promise<string[] | Buffer[]>; | ||
export function readdir(path: PathLike, options: { encoding?: string | null; withFileTypes: true }): Promise<fs.Dirent[]>; | ||
export function readlink(path: string | Buffer, callback: (err: NodeJS.ErrnoException, linkString: string) => any): void; | ||
export function readlink(path: string | Buffer): Promise<string>; | ||
export function readlink(path: PathLike, callback: (err: NodeJS.ErrnoException, linkString: string) => any): void; | ||
export function readlink(path: PathLike): Promise<string>; | ||
export function realpath(path: string | Buffer, callback: (err: NodeJS.ErrnoException, resolvedPath: string) => any): void; | ||
export function realpath(path: string | Buffer, cache: { [path: string]: string }, callback: (err: NodeJS.ErrnoException, resolvedPath: string) => any): void; | ||
export function realpath(path: string | Buffer, cache?: { [path: string]: string }): Promise<string>; | ||
export function realpath(path: PathLike, callback: (err: NodeJS.ErrnoException, resolvedPath: string) => any): void; | ||
export function realpath(path: PathLike, cache: { [path: string]: string }, callback: (err: NodeJS.ErrnoException, resolvedPath: string) => any): void; | ||
export function realpath(path: PathLike, cache?: { [path: string]: string }): Promise<string>; | ||
export function rename(oldPath: string, newPath: string, callback: (err: NodeJS.ErrnoException) => void): void; | ||
export function rename(oldPath: string, newPath: string): Promise<void>; | ||
export function rename(oldPath: PathLike, newPath: PathLike, callback: (err: NodeJS.ErrnoException) => void): void; | ||
export function rename(oldPath: PathLike, newPath: PathLike): Promise<void>; | ||
@@ -234,15 +239,15 @@ /** | ||
*/ | ||
export function rmdir(path: string | Buffer, callback: (err: NodeJS.ErrnoException) => void): void; | ||
export function rmdir(path: string | Buffer): Promise<void>; | ||
export function rmdir(path: PathLike, callback: (err: NodeJS.ErrnoException) => void): void; | ||
export function rmdir(path: PathLike): Promise<void>; | ||
export function stat(path: string | Buffer, callback: (err: NodeJS.ErrnoException, stats: Stats) => any): void; | ||
export function stat(path: string | Buffer): Promise<Stats>; | ||
export function stat(path: PathLike, callback: (err: NodeJS.ErrnoException, stats: Stats) => any): void; | ||
export function stat(path: PathLike): Promise<Stats>; | ||
export function symlink(srcpath: string | Buffer, dstpath: string | Buffer, type: FsSymlinkType | undefined, callback: (err: NodeJS.ErrnoException) => void): void; | ||
export function symlink(srcpath: string | Buffer, dstpath: string | Buffer, callback: (err: NodeJS.ErrnoException) => void): void; | ||
export function symlink(srcpath: string | Buffer, dstpath: string | Buffer, type?: FsSymlinkType): Promise<void>; | ||
export function symlink(target: PathLike, path: PathLike, type: FsSymlinkType | undefined, callback: (err: NodeJS.ErrnoException) => void): void; | ||
export function symlink(target: PathLike, path: PathLike, callback: (err: NodeJS.ErrnoException) => void): void; | ||
export function symlink(target: PathLike, path: PathLike, type?: FsSymlinkType): Promise<void>; | ||
export function truncate(path: string | Buffer, callback: (err: NodeJS.ErrnoException) => void): void; | ||
export function truncate(path: string | Buffer, len: number, callback: (err: NodeJS.ErrnoException) => void): void; | ||
export function truncate(path: string | Buffer, len?: number): Promise<void>; | ||
export function truncate(path: PathLike, callback: (err: NodeJS.ErrnoException) => void): void; | ||
export function truncate(path: PathLike, len: number, callback: (err: NodeJS.ErrnoException) => void): void; | ||
export function truncate(path: PathLike, len?: number): Promise<void>; | ||
@@ -254,21 +259,27 @@ /** | ||
*/ | ||
export function unlink(path: string | Buffer, callback: (err: NodeJS.ErrnoException) => void): void; | ||
export function unlink(path: string | Buffer): Promise<void>; | ||
export function unlink(path: PathLike, callback: (err: NodeJS.ErrnoException) => void): void; | ||
export function unlink(path: PathLike): Promise<void>; | ||
export function utimes(path: string | Buffer, atime: number, mtime: number, callback: (err: NodeJS.ErrnoException) => void): void; | ||
export function utimes(path: string | Buffer, atime: Date, mtime: Date, callback: (err: NodeJS.ErrnoException) => void): void; | ||
export function utimes(path: string | Buffer, atime: number, mtime: number): Promise<void>; | ||
export function utimes(path: string | Buffer, atime: Date, mtime: Date): Promise<void>; | ||
export function utimes(path: PathLike, atime: number, mtime: number, callback: (err: NodeJS.ErrnoException) => void): void; | ||
export function utimes(path: PathLike, atime: Date, mtime: Date, callback: (err: NodeJS.ErrnoException) => void): void; | ||
export function utimes(path: PathLike, atime: number, mtime: number): Promise<void>; | ||
export function utimes(path: PathLike, atime: Date, mtime: Date): Promise<void>; | ||
export function write(fd: number, buffer: Buffer, offset: number, length: number, position: number | null, callback: (err: NodeJS.ErrnoException, written: number, buffer: Buffer) => void): void; | ||
export function write(fd: number, buffer: Buffer, offset: number, length: number, callback: (err: NodeJS.ErrnoException, written: number, buffer: Buffer) => void): void; | ||
export function write<TBuffer extends ArrayBufferView>( | ||
fd: number, buffer: TBuffer, offset: number, length: number, position: number | null, | ||
callback: (err: NodeJS.ErrnoException, written: number, buffer: TBuffer) => void | ||
): void; | ||
export function write<TBuffer extends ArrayBufferView>( | ||
fd: number, buffer: TBuffer, offset: number, length: number, | ||
callback: (err: NodeJS.ErrnoException, written: number, buffer: TBuffer) => void | ||
): void; | ||
export function write(fd: number, data: any, callback: (err: NodeJS.ErrnoException, written: number, str: string) => void): void; | ||
export function write(fd: number, data: any, offset: number, callback: (err: NodeJS.ErrnoException, written: number, str: string) => void): void; | ||
export function write(fd: number, data: any, offset: number, encoding: string, callback: (err: NodeJS.ErrnoException, written: number, str: string) => void): void; | ||
export function write(fd: number, buffer: Buffer, offset?: number, length?: number, position?: number | null): Promise<WriteResult>; | ||
export function write(fd: number, data: any, offset?: number, encoding?: string): Promise<WriteResult>; | ||
export function write<TBuffer extends ArrayBufferView>(fd: number, buffer: TBuffer, offset?: number, length?: number, position?: number | null): Promise<{ bytesWritten: number, buffer: TBuffer }>; | ||
export function write(fd: number, data: any, offset?: number, encoding?: string): Promise<{ bytesWritten: number, buffer: string }>; | ||
export function writeFile(file: string | Buffer | number, data: any, callback: (err: NodeJS.ErrnoException) => void): void; | ||
export function writeFile(file: string | Buffer | number, data: any, options?: WriteFileOptions | string): Promise<void>; | ||
export function writeFile(file: string | Buffer | number, data: any, options: WriteFileOptions | string, callback: (err: NodeJS.ErrnoException) => void): void; | ||
export function writeFile(file: PathLike | number, data: any, callback: (err: NodeJS.ErrnoException) => void): void; | ||
export function writeFile(file: PathLike | number, data: any, options?: WriteFileOptions | string): Promise<void>; | ||
export function writeFile(file: PathLike | number, data: any, options: WriteFileOptions | string, callback: (err: NodeJS.ErrnoException) => void): void; | ||
@@ -302,2 +313,6 @@ export function writev(fd: number, buffers: NodeJS.ArrayBufferView[], position: number, cb: (err: NodeJS.ErrnoException | null, bytesWritten: number, buffers: NodeJS.ArrayBufferView[]) => void): void; | ||
export type Mode = string | number; | ||
export type ArrayBufferView = NodeJS.TypedArray | DataView; | ||
export interface CopyOptions { | ||
@@ -346,12 +361,2 @@ dereference?: boolean; | ||
export interface ReadResult { | ||
bytesRead: number; | ||
buffer: Buffer; | ||
} | ||
export interface WriteResult { | ||
bytesWritten: number; | ||
buffer: Buffer; | ||
} | ||
export interface WritevResult { | ||
@@ -358,0 +363,0 @@ bytesWritten: number; |
{ | ||
"name": "@types/fs-extra", | ||
"version": "9.0.1", | ||
"version": "9.0.2", | ||
"description": "TypeScript definitions for fs-extra", | ||
@@ -46,2 +46,7 @@ "license": "MIT", | ||
"githubUsername": "peterblazejewicz" | ||
}, | ||
{ | ||
"name": "Tiger Oakes", | ||
"url": "https://github.com/NotWoods", | ||
"githubUsername": "NotWoods" | ||
} | ||
@@ -60,4 +65,4 @@ ], | ||
}, | ||
"typesPublisherContentHash": "9d28deaa6863f32d761ce087db7c8ba713a4bc06c13526d9e66d3638e5e0863c", | ||
"typeScriptVersion": "3.0" | ||
"typesPublisherContentHash": "3301bb09674464dfd7e3a252e2f1a3fca1bf19faa55bf6e31fe0763f2e8aa950", | ||
"typeScriptVersion": "3.2" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
### Additional Details | ||
* Last updated: Tue, 19 May 2020 18:23:53 GMT | ||
* Last updated: Sun, 11 Oct 2020 18:18:08 GMT | ||
* Dependencies: [@types/node](https://npmjs.com/package/@types/node) | ||
@@ -17,2 +17,2 @@ * Global values: none | ||
# Credits | ||
These definitions were written by [Alan Agius](https://github.com/alan-agius4), [midknight41](https://github.com/midknight41), [Brendan Forster](https://github.com/shiftkey), [Mees van Dijk](https://github.com/mees-), [Justin Rockwood](https://github.com/jrockwood), [Sang Dang](https://github.com/sangdth), [Florian Keller](https://github.com/ffflorian), and [Piotr Błażejewicz](https://github.com/peterblazejewicz). | ||
These definitions were written by [Alan Agius](https://github.com/alan-agius4), [midknight41](https://github.com/midknight41), [Brendan Forster](https://github.com/shiftkey), [Mees van Dijk](https://github.com/mees-), [Justin Rockwood](https://github.com/jrockwood), [Sang Dang](https://github.com/sangdth), [Florian Keller](https://github.com/ffflorian), [Piotr Błażejewicz](https://github.com/peterblazejewicz), and [Tiger Oakes](https://github.com/NotWoods). |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24490
282