@platform/fs
Advanced tools
Comparing version 0.4.0 to 0.5.0
@@ -13,5 +13,6 @@ /// <reference types="node" /> | ||
import { stream } from '../stream'; | ||
import { sort } from '../sort'; | ||
export declare const fs: { | ||
size: { | ||
toString(bytes: number, options?: import("../size").IFileSizeStringOptions | undefined): string; | ||
toString(input: number | Buffer, options?: import("../size").IFileSizeStringOptions | undefined): string; | ||
file(path: string): Promise<import("../size").IFileSize>; | ||
@@ -27,2 +28,3 @@ dir(path: string): Promise<{ | ||
glob: typeof glob; | ||
sort: typeof sort; | ||
file: typeof file; | ||
@@ -29,0 +31,0 @@ ancestor: typeof ancestor; |
@@ -16,5 +16,7 @@ "use strict"; | ||
var stream_1 = require("../stream"); | ||
var sort_1 = require("../sort"); | ||
exports.fs = tslib_1.__assign(tslib_1.__assign({}, fsExtra), { size: size_1.size, | ||
stream: stream_1.stream, | ||
glob: glob_1.glob, | ||
sort: sort_1.sort, | ||
file: file_1.File, | ||
@@ -21,0 +23,0 @@ ancestor: ancestor_1.ancestor, |
@@ -0,1 +1,2 @@ | ||
/// <reference types="node" /> | ||
export declare type IFileSize = { | ||
@@ -14,3 +15,3 @@ path: string; | ||
export declare const size: { | ||
toString(bytes: number, options?: IFileSizeStringOptions | undefined): string; | ||
toString(input: number | Buffer, options?: IFileSizeStringOptions | undefined): string; | ||
file(path: string): Promise<IFileSize>; | ||
@@ -17,0 +18,0 @@ dir(path: string): Promise<{ |
@@ -9,3 +9,4 @@ "use strict"; | ||
exports.size = { | ||
toString: function (bytes, options) { | ||
toString: function (input, options) { | ||
var bytes = typeof input === 'number' ? input : Uint8Array.from(input).length; | ||
return filesize(bytes, options); | ||
@@ -12,0 +13,0 @@ }, |
@@ -1,21 +0,1 @@ | ||
export declare type IFileSize = { | ||
path: string; | ||
bytes: number; | ||
toString(options?: IFileSizeStringOptions): string; | ||
}; | ||
export declare type IFolderSize = IFileSize & { | ||
files: IFileSize[]; | ||
}; | ||
export declare type IFileSizeStringOptions = { | ||
spacer?: string; | ||
round?: number; | ||
}; | ||
export declare const size: { | ||
file(path: string): Promise<IFileSize>; | ||
dir(path: string): Promise<{ | ||
path: string; | ||
bytes: number; | ||
files: IFileSize[]; | ||
toString(options?: IFileSizeStringOptions | undefined): string; | ||
}>; | ||
}; | ||
export {}; |
@@ -1,1 +0,2 @@ | ||
export declare function save(path: string, data: ReadableStream): Promise<void>; | ||
/// <reference types="node" /> | ||
export declare function save(path: string, data: NodeJS.ReadableStream): Promise<void>; |
{ | ||
"name": "@platform/fs", | ||
"version": "0.4.0", | ||
"version": "0.5.0", | ||
"description": "File-system tools.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index", |
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
70870
73
1531