Update fs-extra-promise and fs-extra-promise-es6

* Edit `symlinkAsync` and `symlinkSync`
* Fix test
This commit is contained in:
khai96_ 2018-05-24 09:29:15 +07:00
parent 80987f1428
commit 813279ba32
4 changed files with 11 additions and 10 deletions

View File

@ -18,7 +18,7 @@ let buffer: Buffer;
declare const modeNum: number;
declare const modeStr: string;
declare const encoding: string;
declare const type: string;
declare const symlinkType: "file" | "dir" | "junction";
declare const flags: string;
declare const srcpath: string;
declare const dstpath: string;
@ -117,8 +117,8 @@ stats = fs.lstatSync(path);
stats = fs.fstatSync(fd);
fs.link(srcpath, dstpath, errorCallback);
fs.linkSync(srcpath, dstpath);
fs.symlink(srcpath, dstpath, type, errorCallback);
fs.symlinkSync(srcpath, dstpath, type);
fs.symlink(srcpath, dstpath, symlinkType, errorCallback);
fs.symlinkSync(srcpath, dstpath, symlinkType);
fs.readlink(path, (err: Error, linkString: string) => {
});
fs.realpath(path, (err: Error, resolvedPath: string) => {

View File

@ -90,7 +90,7 @@ export function fstatSync(fd: number): Stats;
export function link(srcpath: string, dstpath: string, callback?: (err: Error) => void): void;
export function linkSync(srcpath: string, dstpath: string): void;
export function symlink(srcpath: string, dstpath: string, type?: string, callback?: (err: Error) => void): void;
export function symlinkSync(srcpath: string, dstpath: string, type?: string): void;
export function symlinkSync(srcpath: string, dstpath: string, type?: fs.symlink.Type): void;
export function readlink(path: string, callback?: (err: Error, linkString: string) => void): void;
export function realpath(path: string, callback?: (err: Error, resolvedPath: string) => void): void;
export function realpath(path: string, cache: string, callback: (err: Error, resolvedPath: string) => void): void;
@ -189,7 +189,7 @@ export function statAsync(path: string): Promise<Stats>;
export function lstatAsync(path: string): Promise<Stats>;
export function fstatAsync(fd: number): Promise<Stats>;
export function linkAsync(srcpath: string, dstpath: string): Promise<void>;
export function symlinkAsync(srcpath: string, dstpath: string, type?: string): Promise<void>;
export function symlinkAsync(srcpath: string, dstpath: string, type?: fs.symlink.Type): Promise<void>;
export function readlinkAsync(path: string): Promise<string>;
export function realpathAsync(path: string, cache?: string): Promise<string>;
export function unlinkAsync(path: string): Promise<void>;

View File

@ -20,7 +20,7 @@ let buffer: Buffer;
declare const modeNum: number;
declare const modeStr: string;
declare const encoding: string;
declare const type: string;
declare const symlinkType: "file" | "dir" | "junction";
declare const flags: string;
declare const srcpath: string;
declare const dstpath: string;
@ -117,8 +117,8 @@ stats = fs.lstatSync(path);
stats = fs.fstatSync(fd);
fs.link(srcpath, dstpath, errorCallback);
fs.linkSync(srcpath, dstpath);
fs.symlink(srcpath, dstpath, type, errorCallback);
fs.symlinkSync(srcpath, dstpath, type);
fs.symlink(srcpath, dstpath, symlinkType, errorCallback);
fs.symlinkSync(srcpath, dstpath, symlinkType);
fs.readlink(path, (err: Error, linkString: string) => {
});
fs.realpath(path, (err: Error, resolvedPath: string) => {

View File

@ -7,9 +7,10 @@
/// <reference types="node" />
import * as stream from 'stream';
import { Stats } from 'fs';
import * as fs from 'fs';
import * as Promise from 'bluebird';
import { CopyFilter, CopyOptions, ReadOptions, WriteOptions, MoveOptions } from 'fs-extra';
import Stats = fs.Stats;
export * from 'fs-extra';
@ -53,7 +54,7 @@ export function statAsync(path: string): Promise<Stats>;
export function lstatAsync(path: string): Promise<Stats>;
export function fstatAsync(fd: number): Promise<Stats>;
export function linkAsync(srcpath: string, dstpath: string): Promise<void>;
export function symlinkAsync(srcpath: string, dstpath: string, type?: string): Promise<void>;
export function symlinkAsync(srcpath: string, dstpath: string, type?: fs.symlink.Type): Promise<void>;
export function readlinkAsync(path: string): Promise<string>;
export function realpathAsync(path: string, cache?: { [path: string]: string }): Promise<string>;
export function unlinkAsync(path: string): Promise<void>;