@spinajs/fs
Advanced tools
Comparing version 2.0.163 to 2.0.164
@@ -61,5 +61,22 @@ /// <reference types="node" /> | ||
abstract Name: string; | ||
/** | ||
* Downloads file to local storage and returns path to it. | ||
* If used on local storage provider eg. hard drive it only returns full path to file | ||
* | ||
* On remote storage provivers eg. amazon s3 - it tries to download it to local disk first and returns | ||
* full path. | ||
* | ||
* Returns local path to file | ||
* | ||
* @param path path to download | ||
*/ | ||
abstract download(path: string): Promise<string>; | ||
/** | ||
* | ||
* Returns full LOCAL path to file | ||
* | ||
* @param path path to resolve | ||
*/ | ||
abstract resolvePath(path: string): string; | ||
abstract read(path: string, encoding: BufferEncoding): Promise<string | Buffer>; | ||
abstract read(path: string, encoding?: BufferEncoding): Promise<string | Buffer>; | ||
abstract readStream(path: string, encoding?: BufferEncoding): Promise<ReadStream>; | ||
@@ -66,0 +83,0 @@ abstract write(path: string, data: string | Buffer, encoding?: BufferEncoding): Promise<void>; |
@@ -61,5 +61,22 @@ /// <reference types="node" resolution-mode="require"/> | ||
abstract Name: string; | ||
/** | ||
* Downloads file to local storage and returns path to it. | ||
* If used on local storage provider eg. hard drive it only returns full path to file | ||
* | ||
* On remote storage provivers eg. amazon s3 - it tries to download it to local disk first and returns | ||
* full path. | ||
* | ||
* Returns local path to file | ||
* | ||
* @param path path to download | ||
*/ | ||
abstract download(path: string): Promise<string>; | ||
/** | ||
* | ||
* Returns full LOCAL path to file | ||
* | ||
* @param path path to resolve | ||
*/ | ||
abstract resolvePath(path: string): string; | ||
abstract read(path: string, encoding: BufferEncoding): Promise<string | Buffer>; | ||
abstract read(path: string, encoding?: BufferEncoding): Promise<string | Buffer>; | ||
abstract readStream(path: string, encoding?: BufferEncoding): Promise<ReadStream>; | ||
@@ -66,0 +83,0 @@ abstract write(path: string, data: string | Buffer, encoding?: BufferEncoding): Promise<void>; |
{ | ||
"name": "@spinajs/fs", | ||
"version": "2.0.163", | ||
"version": "2.0.164", | ||
"description": "wrapper for file operations", | ||
@@ -55,3 +55,3 @@ | ||
"dependencies": { | ||
"@spinajs/exceptions": "2.0.163", | ||
"@spinajs/exceptions": "2.0.164", | ||
"archiver": "^5.3.1", | ||
@@ -58,0 +58,0 @@ "lodash": "^4.17.21", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
229722
1495
+ Added@spinajs/exceptions@2.0.164(transitive)
- Removed@spinajs/exceptions@2.0.163(transitive)
Updated@spinajs/exceptions@2.0.164