mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Added path methods to the FileSystem methods. Added unit tests.
This commit is contained in:
20
FileSystem/file_system.d.ts
vendored
20
FileSystem/file_system.d.ts
vendored
@@ -127,4 +127,24 @@ export declare module knownFolders {
|
||||
* Gets the Temporary (Caches) folder available for the current application. This Folder is private for the application and not accessible from Users/External apps.
|
||||
*/
|
||||
export function temp(): Folder;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enables path-specific operations like join, extension, etc.
|
||||
*/
|
||||
export declare module path {
|
||||
/**
|
||||
* Normalizes a path, taking care of occurrances like ".." and "//"
|
||||
*/
|
||||
export function normalize(path: string): string;
|
||||
|
||||
/**
|
||||
* Joins all the provided string components, forming a valid and normalized path.
|
||||
*/
|
||||
export function join(...paths: string[]): string;
|
||||
|
||||
/**
|
||||
* Gets the string used to separate file paths.
|
||||
*/
|
||||
export var separator: string;
|
||||
}
|
||||
Reference in New Issue
Block a user