@capacitor/filesystem
Advanced tools
Comparing version 0.0.1 to 0.1.0
@@ -10,3 +10,3 @@ { | ||
"name": "readFile", | ||
"signature": "(options: FileReadOptions) => Promise<FileReadResult>", | ||
"signature": "(options: ReadFileOptions) => Promise<ReadFileResult>", | ||
"parameters": [ | ||
@@ -16,6 +16,6 @@ { | ||
"docs": "", | ||
"type": "FileReadOptions" | ||
"type": "ReadFileOptions" | ||
} | ||
], | ||
"returns": "Promise<FileReadResult>", | ||
"returns": "Promise<ReadFileResult>", | ||
"tags": [ | ||
@@ -29,4 +29,4 @@ { | ||
"complexTypes": [ | ||
"FileReadResult", | ||
"FileReadOptions" | ||
"ReadFileResult", | ||
"ReadFileOptions" | ||
], | ||
@@ -37,3 +37,3 @@ "slug": "readfile" | ||
"name": "writeFile", | ||
"signature": "(options: FileWriteOptions) => Promise<FileWriteResult>", | ||
"signature": "(options: WriteFileOptions) => Promise<WriteFileResult>", | ||
"parameters": [ | ||
@@ -43,6 +43,6 @@ { | ||
"docs": "", | ||
"type": "FileWriteOptions" | ||
"type": "WriteFileOptions" | ||
} | ||
], | ||
"returns": "Promise<FileWriteResult>", | ||
"returns": "Promise<WriteFileResult>", | ||
"tags": [ | ||
@@ -56,4 +56,4 @@ { | ||
"complexTypes": [ | ||
"FileWriteResult", | ||
"FileWriteOptions" | ||
"WriteFileResult", | ||
"WriteFileOptions" | ||
], | ||
@@ -64,3 +64,3 @@ "slug": "writefile" | ||
"name": "appendFile", | ||
"signature": "(options: FileAppendOptions) => Promise<void>", | ||
"signature": "(options: AppendFileOptions) => Promise<void>", | ||
"parameters": [ | ||
@@ -70,3 +70,3 @@ { | ||
"docs": "", | ||
"type": "FileAppendOptions" | ||
"type": "AppendFileOptions" | ||
} | ||
@@ -83,3 +83,3 @@ ], | ||
"complexTypes": [ | ||
"FileAppendOptions" | ||
"AppendFileOptions" | ||
], | ||
@@ -90,3 +90,3 @@ "slug": "appendfile" | ||
"name": "deleteFile", | ||
"signature": "(options: FileDeleteOptions) => Promise<void>", | ||
"signature": "(options: DeleteFileOptions) => Promise<void>", | ||
"parameters": [ | ||
@@ -96,3 +96,3 @@ { | ||
"docs": "", | ||
"type": "FileDeleteOptions" | ||
"type": "DeleteFileOptions" | ||
} | ||
@@ -109,3 +109,3 @@ ], | ||
"complexTypes": [ | ||
"FileDeleteOptions" | ||
"DeleteFileOptions" | ||
], | ||
@@ -280,5 +280,5 @@ "slug": "deletefile" | ||
"name": "checkPermissions", | ||
"signature": "() => Promise<FilesystemPermissionStatus>", | ||
"signature": "() => Promise<PermissionStatus>", | ||
"parameters": [], | ||
"returns": "Promise<FilesystemPermissionStatus>", | ||
"returns": "Promise<PermissionStatus>", | ||
"tags": [ | ||
@@ -290,5 +290,5 @@ { | ||
], | ||
"docs": "Check read/write permissions.\nRequired on Android, only when using FilesystemDirectory.Documents or\nFilesystemDirectory.ExternalStorage.", | ||
"docs": "Check read/write permissions.\nRequired on Android, only when using `Directory.Documents` or\n`Directory.ExternalStorage`.", | ||
"complexTypes": [ | ||
"FilesystemPermissionStatus" | ||
"PermissionStatus" | ||
], | ||
@@ -299,5 +299,5 @@ "slug": "checkpermissions" | ||
"name": "requestPermissions", | ||
"signature": "() => Promise<FilesystemPermissionStatus>", | ||
"signature": "() => Promise<PermissionStatus>", | ||
"parameters": [], | ||
"returns": "Promise<FilesystemPermissionStatus>", | ||
"returns": "Promise<PermissionStatus>", | ||
"tags": [ | ||
@@ -309,5 +309,5 @@ { | ||
], | ||
"docs": "Request read/write permissions.\nRequired on Android, only when using FilesystemDirectory.Documents or\nFilesystemDirectory.ExternalStorage.", | ||
"docs": "Request read/write permissions.\nRequired on Android, only when using `Directory.Documents` or\n`Directory.ExternalStorage`.", | ||
"complexTypes": [ | ||
"FilesystemPermissionStatus" | ||
"PermissionStatus" | ||
], | ||
@@ -321,4 +321,4 @@ "slug": "requestpermissions" | ||
{ | ||
"name": "FileReadResult", | ||
"slug": "filereadresult", | ||
"name": "ReadFileResult", | ||
"slug": "readfileresult", | ||
"docs": "", | ||
@@ -343,4 +343,4 @@ "tags": [], | ||
{ | ||
"name": "FileReadOptions", | ||
"slug": "filereadoptions", | ||
"name": "ReadFileOptions", | ||
"slug": "readfileoptions", | ||
"docs": "", | ||
@@ -370,7 +370,7 @@ "tags": [], | ||
], | ||
"docs": "The FilesystemDirectory to read the file from", | ||
"docs": "The `Directory` to read the file from", | ||
"complexTypes": [ | ||
"FilesystemDirectory" | ||
"Directory" | ||
], | ||
"type": "FilesystemDirectory | undefined" | ||
"type": "Directory" | ||
}, | ||
@@ -385,7 +385,7 @@ { | ||
], | ||
"docs": "The encoding to read the file in, if not provided, data\nis read as binary and returned as base64 encoded.\n\nPass FilesystemEncoding.UTF8 to read data as string", | ||
"docs": "The encoding to read the file in, if not provided, data\nis read as binary and returned as base64 encoded.\n\nPass Encoding.UTF8 to read data as string", | ||
"complexTypes": [ | ||
"FilesystemEncoding" | ||
"Encoding" | ||
], | ||
"type": "FilesystemEncoding | undefined" | ||
"type": "Encoding" | ||
} | ||
@@ -395,4 +395,4 @@ ] | ||
{ | ||
"name": "FileWriteResult", | ||
"slug": "filewriteresult", | ||
"name": "WriteFileResult", | ||
"slug": "writefileresult", | ||
"docs": "", | ||
@@ -417,4 +417,4 @@ "tags": [], | ||
{ | ||
"name": "FileWriteOptions", | ||
"slug": "filewriteoptions", | ||
"name": "WriteFileOptions", | ||
"slug": "writefileoptions", | ||
"docs": "", | ||
@@ -456,7 +456,7 @@ "tags": [], | ||
], | ||
"docs": "The FilesystemDirectory to store the file in", | ||
"docs": "The `Directory` to store the file in", | ||
"complexTypes": [ | ||
"FilesystemDirectory" | ||
"Directory" | ||
], | ||
"type": "FilesystemDirectory | undefined" | ||
"type": "Directory" | ||
}, | ||
@@ -471,7 +471,7 @@ { | ||
], | ||
"docs": "The encoding to write the file in. If not provided, data\nis written as base64 encoded.\n\nPass FilesystemEncoding.UTF8 to write data as string", | ||
"docs": "The encoding to write the file in. If not provided, data\nis written as base64 encoded.\n\nPass Encoding.UTF8 to write data as string", | ||
"complexTypes": [ | ||
"FilesystemEncoding" | ||
"Encoding" | ||
], | ||
"type": "FilesystemEncoding | undefined" | ||
"type": "Encoding" | ||
}, | ||
@@ -497,4 +497,4 @@ { | ||
{ | ||
"name": "FileAppendOptions", | ||
"slug": "fileappendoptions", | ||
"name": "AppendFileOptions", | ||
"slug": "appendfileoptions", | ||
"docs": "", | ||
@@ -536,7 +536,7 @@ "tags": [], | ||
], | ||
"docs": "The FilesystemDirectory to store the file in", | ||
"docs": "The `Directory` to store the file in", | ||
"complexTypes": [ | ||
"FilesystemDirectory" | ||
"Directory" | ||
], | ||
"type": "FilesystemDirectory | undefined" | ||
"type": "Directory" | ||
}, | ||
@@ -553,5 +553,5 @@ { | ||
"complexTypes": [ | ||
"FilesystemEncoding" | ||
"Encoding" | ||
], | ||
"type": "FilesystemEncoding | undefined" | ||
"type": "Encoding" | ||
} | ||
@@ -561,4 +561,4 @@ ] | ||
{ | ||
"name": "FileDeleteOptions", | ||
"slug": "filedeleteoptions", | ||
"name": "DeleteFileOptions", | ||
"slug": "deletefileoptions", | ||
"docs": "", | ||
@@ -588,7 +588,7 @@ "tags": [], | ||
], | ||
"docs": "The FilesystemDirectory to delete the file from", | ||
"docs": "The `Directory` to delete the file from", | ||
"complexTypes": [ | ||
"FilesystemDirectory" | ||
"Directory" | ||
], | ||
"type": "FilesystemDirectory | undefined" | ||
"type": "Directory" | ||
} | ||
@@ -624,7 +624,7 @@ ] | ||
], | ||
"docs": "The FilesystemDirectory to make the new directory in", | ||
"docs": "The `Directory` to make the new directory in", | ||
"complexTypes": [ | ||
"FilesystemDirectory" | ||
"Directory" | ||
], | ||
"type": "FilesystemDirectory | undefined" | ||
"type": "Directory" | ||
}, | ||
@@ -676,7 +676,7 @@ { | ||
], | ||
"docs": "The FilesystemDirectory to remove the directory from", | ||
"docs": "The `Directory` to remove the directory from", | ||
"complexTypes": [ | ||
"FilesystemDirectory" | ||
"Directory" | ||
], | ||
"type": "FilesystemDirectory | undefined" | ||
"type": "Directory" | ||
}, | ||
@@ -749,7 +749,7 @@ { | ||
], | ||
"docs": "The FilesystemDirectory to list files from", | ||
"docs": "The `Directory` to list files from", | ||
"complexTypes": [ | ||
"FilesystemDirectory" | ||
"Directory" | ||
], | ||
"type": "FilesystemDirectory | undefined" | ||
"type": "Directory" | ||
} | ||
@@ -806,7 +806,7 @@ ] | ||
], | ||
"docs": "The FilesystemDirectory to get the file under", | ||
"docs": "The `Directory` to get the file under", | ||
"complexTypes": [ | ||
"FilesystemDirectory" | ||
"Directory" | ||
], | ||
"type": "FilesystemDirectory" | ||
"type": "Directory" | ||
} | ||
@@ -911,7 +911,7 @@ ] | ||
], | ||
"docs": "The FilesystemDirectory to get the file under", | ||
"docs": "The `Directory` to get the file under", | ||
"complexTypes": [ | ||
"FilesystemDirectory" | ||
"Directory" | ||
], | ||
"type": "FilesystemDirectory | undefined" | ||
"type": "Directory" | ||
} | ||
@@ -959,7 +959,7 @@ ] | ||
], | ||
"docs": "The FilesystemDirectory containing the existing file or directory", | ||
"docs": "The `Directory` containing the existing file or directory", | ||
"complexTypes": [ | ||
"FilesystemDirectory" | ||
"Directory" | ||
], | ||
"type": "FilesystemDirectory | undefined" | ||
"type": "Directory" | ||
}, | ||
@@ -974,7 +974,7 @@ { | ||
], | ||
"docs": "The FilesystemDirectory containing the destination file or directory. If not supplied will use the 'directory'\nparameter as the destination", | ||
"docs": "The `Directory` containing the destination file or directory. If not supplied will use the 'directory'\nparameter as the destination", | ||
"complexTypes": [ | ||
"FilesystemDirectory" | ||
"Directory" | ||
], | ||
"type": "FilesystemDirectory | undefined" | ||
"type": "Directory" | ||
} | ||
@@ -984,4 +984,4 @@ ] | ||
{ | ||
"name": "FilesystemPermissionStatus", | ||
"slug": "filesystempermissionstatus", | ||
"name": "PermissionStatus", | ||
"slug": "permissionstatus", | ||
"docs": "", | ||
@@ -998,3 +998,3 @@ "tags": [], | ||
], | ||
"type": "any" | ||
"type": "PermissionState" | ||
} | ||
@@ -1006,4 +1006,4 @@ ] | ||
{ | ||
"name": "FilesystemDirectory", | ||
"slug": "filesystemdirectory", | ||
"name": "Directory", | ||
"slug": "directory", | ||
"members": [ | ||
@@ -1068,4 +1068,4 @@ { | ||
{ | ||
"name": "FilesystemEncoding", | ||
"slug": "filesystemencoding", | ||
"name": "Encoding", | ||
"slug": "encoding", | ||
"members": [ | ||
@@ -1107,3 +1107,41 @@ { | ||
} | ||
], | ||
"typeAliases": [ | ||
{ | ||
"name": "RenameOptions", | ||
"slug": "renameoptions", | ||
"docs": "", | ||
"types": [ | ||
{ | ||
"text": "CopyOptions", | ||
"complexTypes": [ | ||
"CopyOptions" | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "PermissionState", | ||
"slug": "permissionstate", | ||
"docs": "", | ||
"types": [ | ||
{ | ||
"text": "'prompt'", | ||
"complexTypes": [] | ||
}, | ||
{ | ||
"text": "'prompt-with-rationale'", | ||
"complexTypes": [] | ||
}, | ||
{ | ||
"text": "'granted'", | ||
"complexTypes": [] | ||
}, | ||
{ | ||
"text": "'denied'", | ||
"complexTypes": [] | ||
} | ||
] | ||
} | ||
] | ||
} |
@@ -1,5 +0,6 @@ | ||
export interface FilesystemPermissionStatus { | ||
import type { PermissionState } from '@capacitor/core'; | ||
export interface PermissionStatus { | ||
publicStorage: PermissionState; | ||
} | ||
export declare enum FilesystemDirectory { | ||
export declare enum Directory { | ||
/** | ||
@@ -58,3 +59,3 @@ * The Documents directory | ||
} | ||
export declare enum FilesystemEncoding { | ||
export declare enum Encoding { | ||
/** | ||
@@ -83,3 +84,3 @@ * Eight-bit UCS Transformation Format | ||
} | ||
export interface FileWriteOptions { | ||
export interface WriteFileOptions { | ||
/** | ||
@@ -98,7 +99,7 @@ * The path of the file to write | ||
/** | ||
* The FilesystemDirectory to store the file in | ||
* The `Directory` to store the file in | ||
* | ||
* @since 1.0.0 | ||
*/ | ||
directory?: FilesystemDirectory; | ||
directory?: Directory; | ||
/** | ||
@@ -108,7 +109,7 @@ * The encoding to write the file in. If not provided, data | ||
* | ||
* Pass FilesystemEncoding.UTF8 to write data as string | ||
* Pass Encoding.UTF8 to write data as string | ||
* | ||
* @since 1.0.0 | ||
*/ | ||
encoding?: FilesystemEncoding; | ||
encoding?: Encoding; | ||
/** | ||
@@ -122,3 +123,3 @@ * Whether to create any missing parent directories. | ||
} | ||
export interface FileAppendOptions { | ||
export interface AppendFileOptions { | ||
/** | ||
@@ -137,7 +138,7 @@ * The path of the file to append | ||
/** | ||
* The FilesystemDirectory to store the file in | ||
* The `Directory` to store the file in | ||
* | ||
* @since 1.0.0 | ||
*/ | ||
directory?: FilesystemDirectory; | ||
directory?: Directory; | ||
/** | ||
@@ -151,5 +152,5 @@ * The encoding to write the file in. If not provided, data | ||
*/ | ||
encoding?: FilesystemEncoding; | ||
encoding?: Encoding; | ||
} | ||
export interface FileReadOptions { | ||
export interface ReadFileOptions { | ||
/** | ||
@@ -162,7 +163,7 @@ * The path of the file to read | ||
/** | ||
* The FilesystemDirectory to read the file from | ||
* The `Directory` to read the file from | ||
* | ||
* @since 1.0.0 | ||
*/ | ||
directory?: FilesystemDirectory; | ||
directory?: Directory; | ||
/** | ||
@@ -172,9 +173,9 @@ * The encoding to read the file in, if not provided, data | ||
* | ||
* Pass FilesystemEncoding.UTF8 to read data as string | ||
* Pass Encoding.UTF8 to read data as string | ||
* | ||
* @since 1.0.0 | ||
*/ | ||
encoding?: FilesystemEncoding; | ||
encoding?: Encoding; | ||
} | ||
export interface FileDeleteOptions { | ||
export interface DeleteFileOptions { | ||
/** | ||
@@ -187,7 +188,7 @@ * The path of the file to delete | ||
/** | ||
* The FilesystemDirectory to delete the file from | ||
* The `Directory` to delete the file from | ||
* | ||
* @since 1.0.0 | ||
*/ | ||
directory?: FilesystemDirectory; | ||
directory?: Directory; | ||
} | ||
@@ -202,7 +203,7 @@ export interface MkdirOptions { | ||
/** | ||
* The FilesystemDirectory to make the new directory in | ||
* The `Directory` to make the new directory in | ||
* | ||
* @since 1.0.0 | ||
*/ | ||
directory?: FilesystemDirectory; | ||
directory?: Directory; | ||
/** | ||
@@ -224,7 +225,7 @@ * Whether to create any missing parent directories as well. | ||
/** | ||
* The FilesystemDirectory to remove the directory from | ||
* The `Directory` to remove the directory from | ||
* | ||
* @since 1.0.0 | ||
*/ | ||
directory?: FilesystemDirectory; | ||
directory?: Directory; | ||
/** | ||
@@ -246,7 +247,7 @@ * Whether to recursively remove the contents of the directory | ||
/** | ||
* The FilesystemDirectory to list files from | ||
* The `Directory` to list files from | ||
* | ||
* @since 1.0.0 | ||
*/ | ||
directory?: FilesystemDirectory; | ||
directory?: Directory; | ||
} | ||
@@ -261,7 +262,7 @@ export interface GetUriOptions { | ||
/** | ||
* The FilesystemDirectory to get the file under | ||
* The `Directory` to get the file under | ||
* | ||
* @since 1.0.0 | ||
*/ | ||
directory: FilesystemDirectory; | ||
directory: Directory; | ||
} | ||
@@ -276,7 +277,7 @@ export interface StatOptions { | ||
/** | ||
* The FilesystemDirectory to get the file under | ||
* The `Directory` to get the file under | ||
* | ||
* @since 1.0.0 | ||
*/ | ||
directory?: FilesystemDirectory; | ||
directory?: Directory; | ||
} | ||
@@ -297,9 +298,9 @@ export interface CopyOptions { | ||
/** | ||
* The FilesystemDirectory containing the existing file or directory | ||
* The `Directory` containing the existing file or directory | ||
* | ||
* @since 1.0.0 | ||
*/ | ||
directory?: FilesystemDirectory; | ||
directory?: Directory; | ||
/** | ||
* The FilesystemDirectory containing the destination file or directory. If not supplied will use the 'directory' | ||
* The `Directory` containing the destination file or directory. If not supplied will use the 'directory' | ||
* parameter as the destination | ||
@@ -309,6 +310,6 @@ * | ||
*/ | ||
toDirectory?: FilesystemDirectory; | ||
toDirectory?: Directory; | ||
} | ||
export declare type RenameOptions = CopyOptions; | ||
export interface FileReadResult { | ||
export interface ReadFileResult { | ||
/** | ||
@@ -321,3 +322,3 @@ * The string representation of the data contained in the file | ||
} | ||
export interface FileWriteResult { | ||
export interface WriteFileResult { | ||
/** | ||
@@ -384,3 +385,3 @@ * The uri where the file was written into | ||
*/ | ||
readFile(options: FileReadOptions): Promise<FileReadResult>; | ||
readFile(options: ReadFileOptions): Promise<ReadFileResult>; | ||
/** | ||
@@ -391,3 +392,3 @@ * Write a file to disk in the specified location on device | ||
*/ | ||
writeFile(options: FileWriteOptions): Promise<FileWriteResult>; | ||
writeFile(options: WriteFileOptions): Promise<WriteFileResult>; | ||
/** | ||
@@ -398,3 +399,3 @@ * Append to a file on disk in the specified location on device | ||
*/ | ||
appendFile(options: FileAppendOptions): Promise<void>; | ||
appendFile(options: AppendFileOptions): Promise<void>; | ||
/** | ||
@@ -405,3 +406,3 @@ * Delete a file from disk | ||
*/ | ||
deleteFile(options: FileDeleteOptions): Promise<void>; | ||
deleteFile(options: DeleteFileOptions): Promise<void>; | ||
/** | ||
@@ -451,16 +452,56 @@ * Create a directory. | ||
* Check read/write permissions. | ||
* Required on Android, only when using FilesystemDirectory.Documents or | ||
* FilesystemDirectory.ExternalStorage. | ||
* Required on Android, only when using `Directory.Documents` or | ||
* `Directory.ExternalStorage`. | ||
* | ||
* @since 1.0.0 | ||
*/ | ||
checkPermissions(): Promise<FilesystemPermissionStatus>; | ||
checkPermissions(): Promise<PermissionStatus>; | ||
/** | ||
* Request read/write permissions. | ||
* Required on Android, only when using FilesystemDirectory.Documents or | ||
* FilesystemDirectory.ExternalStorage. | ||
* Required on Android, only when using `Directory.Documents` or | ||
* `Directory.ExternalStorage`. | ||
* | ||
* @since 1.0.0 | ||
*/ | ||
requestPermissions(): Promise<FilesystemPermissionStatus>; | ||
requestPermissions(): Promise<PermissionStatus>; | ||
} | ||
/** | ||
* @deprecated Use `ReadFileOptions`. | ||
* @since 1.0.0 | ||
*/ | ||
export declare type FileReadOptions = ReadFileOptions; | ||
/** | ||
* @deprecated Use `ReadFileResult`. | ||
* @since 1.0.0 | ||
*/ | ||
export declare type FileReadResult = ReadFileResult; | ||
/** | ||
* @deprecated Use `WriteFileOptions`. | ||
* @since 1.0.0 | ||
*/ | ||
export declare type FileWriteOptions = WriteFileOptions; | ||
/** | ||
* @deprecated Use `WriteFileResult`. | ||
* @since 1.0.0 | ||
*/ | ||
export declare type FileWriteResult = WriteFileResult; | ||
/** | ||
* @deprecated Use `AppendFileOptions`. | ||
* @since 1.0.0 | ||
*/ | ||
export declare type FileAppendOptions = AppendFileOptions; | ||
/** | ||
* @deprecated Use `DeleteFileOptions`. | ||
* @since 1.0.0 | ||
*/ | ||
export declare type FileDeleteOptions = DeleteFileOptions; | ||
/** | ||
* @deprecated Use `Directory`. | ||
* @since 1.0.0 | ||
*/ | ||
export declare const FilesystemDirectory: typeof Directory; | ||
/** | ||
* @deprecated Use `Encoding`. | ||
* @since 1.0.0 | ||
*/ | ||
export declare const FilesystemEncoding: typeof Encoding; |
@@ -1,3 +0,3 @@ | ||
export var FilesystemDirectory; | ||
(function (FilesystemDirectory) { | ||
export var Directory; | ||
(function (Directory) { | ||
/** | ||
@@ -14,3 +14,3 @@ * The Documents directory | ||
*/ | ||
FilesystemDirectory["Documents"] = "DOCUMENTS"; | ||
Directory["Documents"] = "DOCUMENTS"; | ||
/** | ||
@@ -24,3 +24,3 @@ * The Data directory | ||
*/ | ||
FilesystemDirectory["Data"] = "DATA"; | ||
Directory["Data"] = "DATA"; | ||
/** | ||
@@ -33,3 +33,3 @@ * The Cache directory | ||
*/ | ||
FilesystemDirectory["Cache"] = "CACHE"; | ||
Directory["Cache"] = "CACHE"; | ||
/** | ||
@@ -46,3 +46,3 @@ * The external directory | ||
*/ | ||
FilesystemDirectory["External"] = "EXTERNAL"; | ||
Directory["External"] = "EXTERNAL"; | ||
/** | ||
@@ -58,6 +58,6 @@ * The external storage directory | ||
*/ | ||
FilesystemDirectory["ExternalStorage"] = "EXTERNAL_STORAGE"; | ||
})(FilesystemDirectory || (FilesystemDirectory = {})); | ||
export var FilesystemEncoding; | ||
(function (FilesystemEncoding) { | ||
Directory["ExternalStorage"] = "EXTERNAL_STORAGE"; | ||
})(Directory || (Directory = {})); | ||
export var Encoding; | ||
(function (Encoding) { | ||
/** | ||
@@ -68,3 +68,3 @@ * Eight-bit UCS Transformation Format | ||
*/ | ||
FilesystemEncoding["UTF8"] = "utf8"; | ||
Encoding["UTF8"] = "utf8"; | ||
/** | ||
@@ -77,3 +77,3 @@ * Seven-bit ASCII, a.k.a. ISO646-US, a.k.a. the Basic Latin block of the | ||
*/ | ||
FilesystemEncoding["ASCII"] = "ascii"; | ||
Encoding["ASCII"] = "ascii"; | ||
/** | ||
@@ -86,4 +86,14 @@ * Sixteen-bit UCS Transformation Format, byte order identified by an | ||
*/ | ||
FilesystemEncoding["UTF16"] = "utf16"; | ||
})(FilesystemEncoding || (FilesystemEncoding = {})); | ||
Encoding["UTF16"] = "utf16"; | ||
})(Encoding || (Encoding = {})); | ||
/** | ||
* @deprecated Use `Directory`. | ||
* @since 1.0.0 | ||
*/ | ||
export const FilesystemDirectory = Directory; | ||
/** | ||
* @deprecated Use `Encoding`. | ||
* @since 1.0.0 | ||
*/ | ||
export const FilesystemEncoding = Encoding; | ||
//# sourceMappingURL=definitions.js.map |
import type { FilesystemPlugin } from './definitions'; | ||
import { FilesystemDirectory, FilesystemEncoding } from './definitions'; | ||
declare const Filesystem: FilesystemPlugin; | ||
export { Filesystem, FilesystemDirectory, FilesystemEncoding }; | ||
export * from './definitions'; | ||
export { Filesystem }; |
import { registerPlugin } from '@capacitor/core'; | ||
import { FilesystemDirectory, FilesystemEncoding } from './definitions'; | ||
const Filesystem = registerPlugin('Filesystem', { | ||
web: () => import('./web').then(m => new m.FilesystemWeb()), | ||
}); | ||
export { Filesystem, FilesystemDirectory, FilesystemEncoding }; | ||
export * from './definitions'; | ||
export { Filesystem }; | ||
//# sourceMappingURL=index.js.map |
import { WebPlugin } from '@capacitor/core'; | ||
import type { CopyOptions, FileAppendOptions, FileDeleteOptions, FileReadOptions, FileReadResult, FilesystemPermissionStatus, FilesystemPlugin, FileWriteOptions, FileWriteResult, GetUriOptions, GetUriResult, MkdirOptions, ReaddirOptions, ReaddirResult, RenameOptions, RmdirOptions, StatOptions, StatResult } from './definitions'; | ||
import { FilesystemDirectory } from './definitions'; | ||
import type { AppendFileOptions, CopyOptions, DeleteFileOptions, FilesystemPlugin, GetUriOptions, GetUriResult, MkdirOptions, PermissionStatus, ReadFileOptions, ReadFileResult, ReaddirOptions, ReaddirResult, RenameOptions, RmdirOptions, StatOptions, StatResult, WriteFileOptions, WriteFileResult } from './definitions'; | ||
import { Directory } from './definitions'; | ||
export declare class FilesystemWeb extends WebPlugin implements FilesystemPlugin { | ||
DEFAULT_DIRECTORY: FilesystemDirectory; | ||
DEFAULT_DIRECTORY: Directory; | ||
DB_VERSION: number; | ||
@@ -22,3 +22,3 @@ DB_NAME: string; | ||
*/ | ||
readFile(options: FileReadOptions): Promise<FileReadResult>; | ||
readFile(options: ReadFileOptions): Promise<ReadFileResult>; | ||
/** | ||
@@ -29,3 +29,3 @@ * Write a file to disk in the specified location on device | ||
*/ | ||
writeFile(options: FileWriteOptions): Promise<FileWriteResult>; | ||
writeFile(options: WriteFileOptions): Promise<WriteFileResult>; | ||
/** | ||
@@ -36,3 +36,3 @@ * Append to a file on disk in the specified location on device | ||
*/ | ||
appendFile(options: FileAppendOptions): Promise<void>; | ||
appendFile(options: AppendFileOptions): Promise<void>; | ||
/** | ||
@@ -43,3 +43,3 @@ * Delete a file from disk | ||
*/ | ||
deleteFile(options: FileDeleteOptions): Promise<void>; | ||
deleteFile(options: DeleteFileOptions): Promise<void>; | ||
/** | ||
@@ -86,4 +86,4 @@ * Create a directory. | ||
copy(options: CopyOptions): Promise<void>; | ||
requestPermissions(): Promise<FilesystemPermissionStatus>; | ||
checkPermissions(): Promise<FilesystemPermissionStatus>; | ||
requestPermissions(): Promise<PermissionStatus>; | ||
checkPermissions(): Promise<PermissionStatus>; | ||
/** | ||
@@ -90,0 +90,0 @@ * Function that can perform a copy or a rename |
import { WebPlugin } from '@capacitor/core'; | ||
import { FilesystemDirectory } from './definitions'; | ||
import { Directory } from './definitions'; | ||
export class FilesystemWeb extends WebPlugin { | ||
constructor() { | ||
super(...arguments); | ||
this.DEFAULT_DIRECTORY = FilesystemDirectory.Data; | ||
this.DEFAULT_DIRECTORY = Directory.Data; | ||
this.DB_VERSION = 1; | ||
@@ -8,0 +8,0 @@ this.DB_NAME = 'Disc'; |
var capacitorFilesystem = (function (exports, core) { | ||
'use strict'; | ||
(function (FilesystemDirectory) { | ||
(function (Directory) { | ||
/** | ||
@@ -16,3 +16,3 @@ * The Documents directory | ||
*/ | ||
FilesystemDirectory["Documents"] = "DOCUMENTS"; | ||
Directory["Documents"] = "DOCUMENTS"; | ||
/** | ||
@@ -26,3 +26,3 @@ * The Data directory | ||
*/ | ||
FilesystemDirectory["Data"] = "DATA"; | ||
Directory["Data"] = "DATA"; | ||
/** | ||
@@ -35,3 +35,3 @@ * The Cache directory | ||
*/ | ||
FilesystemDirectory["Cache"] = "CACHE"; | ||
Directory["Cache"] = "CACHE"; | ||
/** | ||
@@ -48,3 +48,3 @@ * The external directory | ||
*/ | ||
FilesystemDirectory["External"] = "EXTERNAL"; | ||
Directory["External"] = "EXTERNAL"; | ||
/** | ||
@@ -60,5 +60,5 @@ * The external storage directory | ||
*/ | ||
FilesystemDirectory["ExternalStorage"] = "EXTERNAL_STORAGE"; | ||
})(exports.FilesystemDirectory || (exports.FilesystemDirectory = {})); | ||
(function (FilesystemEncoding) { | ||
Directory["ExternalStorage"] = "EXTERNAL_STORAGE"; | ||
})(exports.Directory || (exports.Directory = {})); | ||
(function (Encoding) { | ||
/** | ||
@@ -69,3 +69,3 @@ * Eight-bit UCS Transformation Format | ||
*/ | ||
FilesystemEncoding["UTF8"] = "utf8"; | ||
Encoding["UTF8"] = "utf8"; | ||
/** | ||
@@ -78,3 +78,3 @@ * Seven-bit ASCII, a.k.a. ISO646-US, a.k.a. the Basic Latin block of the | ||
*/ | ||
FilesystemEncoding["ASCII"] = "ascii"; | ||
Encoding["ASCII"] = "ascii"; | ||
/** | ||
@@ -87,4 +87,14 @@ * Sixteen-bit UCS Transformation Format, byte order identified by an | ||
*/ | ||
FilesystemEncoding["UTF16"] = "utf16"; | ||
})(exports.FilesystemEncoding || (exports.FilesystemEncoding = {})); | ||
Encoding["UTF16"] = "utf16"; | ||
})(exports.Encoding || (exports.Encoding = {})); | ||
/** | ||
* @deprecated Use `Directory`. | ||
* @since 1.0.0 | ||
*/ | ||
const FilesystemDirectory = exports.Directory; | ||
/** | ||
* @deprecated Use `Encoding`. | ||
* @since 1.0.0 | ||
*/ | ||
const FilesystemEncoding = exports.Encoding; | ||
@@ -98,3 +108,3 @@ const Filesystem = core.registerPlugin('Filesystem', { | ||
super(...arguments); | ||
this.DEFAULT_DIRECTORY = exports.FilesystemDirectory.Data; | ||
this.DEFAULT_DIRECTORY = exports.Directory.Data; | ||
this.DB_VERSION = 1; | ||
@@ -577,2 +587,4 @@ this.DB_NAME = 'Disc'; | ||
exports.Filesystem = Filesystem; | ||
exports.FilesystemDirectory = FilesystemDirectory; | ||
exports.FilesystemEncoding = FilesystemEncoding; | ||
@@ -579,0 +591,0 @@ Object.defineProperty(exports, '__esModule', { value: true }); |
{ | ||
"name": "@capacitor/filesystem", | ||
"version": "0.0.1", | ||
"version": "0.1.0", | ||
"description": "The Filesystem API provides a NodeJS-like API for working with files on the device.", | ||
@@ -48,3 +48,3 @@ "main": "dist/esm/index.js", | ||
"@capacitor/core": "^3.0.0-alpha.9", | ||
"@capacitor/docgen": "0.0.11", | ||
"@capacitor/docgen": "0.0.14", | ||
"@capacitor/ios": "^3.0.0-alpha.9", | ||
@@ -80,3 +80,4 @@ "@ionic/eslint-config": "^0.3.0", | ||
"access": "public" | ||
} | ||
}, | ||
"gitHead": "481260d148b920b85755dd5f9b65df0bb0db4244" | ||
} |
223
README.md
@@ -12,2 +12,51 @@ # @capacitor/filesystem | ||
## Understanding Directories and Files | ||
iOS and Android have additional layers of separation between files, such as special directories that are backed up to the Cloud, or ones for storing Documents. The Filesystem API offers a simple way to scope each operation to a specific special directory on the device. | ||
Additionally, the Filesystem API supports using full `file://` paths, or reading `content://` files on Android. Simply leave out the `directory` param to use a full file path. | ||
## Example | ||
```typescript | ||
import { Filesystem, FilesystemDirectory, FilesystemEncoding } from '@capacitor/core'; | ||
const writeSecretFile = async () { | ||
await Filesystem.writeFile({ | ||
path: 'secrets/text.txt', | ||
data: "This is a test", | ||
directory: FilesystemDirectory.Documents, | ||
encoding: FilesystemEncoding.UTF8, | ||
}); | ||
}; | ||
const readSecretFile = async () { | ||
const contents = await Filesystem.readFile({ | ||
path: 'secrets/text.txt', | ||
directory: FilesystemDirectory.Documents, | ||
encoding: FilesystemEncoding.UTF8, | ||
}); | ||
console.log('secrets:', contents); | ||
}; | ||
const deleteSecretFile = async () { | ||
await Filesystem.deleteFile({ | ||
path: 'secrets/text.txt', | ||
directory: FilesystemDirectory.Documents, | ||
}); | ||
}; | ||
const readFilePath = async () { | ||
// Here's an example of reading a file with a full file path. Use this to | ||
// read binary data (base64 encoded) from plugins that return File URIs, such as | ||
// the Camera. | ||
const contents = await Filesystem.readFile({ | ||
path: 'file:///var/mobile/Containers/Data/Application/22A433FD-D82D-4989-8BE6-9FC49DEA20BB/Documents/text.txt' | ||
}); | ||
console.log('data:', contents); | ||
}; | ||
``` | ||
## API | ||
@@ -31,2 +80,3 @@ | ||
* [Interfaces](#interfaces) | ||
* [Type Aliases](#type-aliases) | ||
* [Enums](#enums) | ||
@@ -42,3 +92,3 @@ | ||
```typescript | ||
readFile(options: FileReadOptions) => Promise<FileReadResult> | ||
readFile(options: ReadFileOptions) => Promise<ReadFileResult> | ||
``` | ||
@@ -50,5 +100,5 @@ | ||
| ------------- | ----------------------------------------------------------- | | ||
| **`options`** | <code><a href="#filereadoptions">FileReadOptions</a></code> | | ||
| **`options`** | <code><a href="#readfileoptions">ReadFileOptions</a></code> | | ||
**Returns:** <code>Promise<<a href="#filereadresult">FileReadResult</a>></code> | ||
**Returns:** <code>Promise<<a href="#readfileresult">ReadFileResult</a>></code> | ||
@@ -63,3 +113,3 @@ **Since:** 1.0.0 | ||
```typescript | ||
writeFile(options: FileWriteOptions) => Promise<FileWriteResult> | ||
writeFile(options: WriteFileOptions) => Promise<WriteFileResult> | ||
``` | ||
@@ -71,5 +121,5 @@ | ||
| ------------- | ------------------------------------------------------------- | | ||
| **`options`** | <code><a href="#filewriteoptions">FileWriteOptions</a></code> | | ||
| **`options`** | <code><a href="#writefileoptions">WriteFileOptions</a></code> | | ||
**Returns:** <code>Promise<<a href="#filewriteresult">FileWriteResult</a>></code> | ||
**Returns:** <code>Promise<<a href="#writefileresult">WriteFileResult</a>></code> | ||
@@ -84,3 +134,3 @@ **Since:** 1.0.0 | ||
```typescript | ||
appendFile(options: FileAppendOptions) => Promise<void> | ||
appendFile(options: AppendFileOptions) => Promise<void> | ||
``` | ||
@@ -92,3 +142,3 @@ | ||
| ------------- | --------------------------------------------------------------- | | ||
| **`options`** | <code><a href="#fileappendoptions">FileAppendOptions</a></code> | | ||
| **`options`** | <code><a href="#appendfileoptions">AppendFileOptions</a></code> | | ||
@@ -103,3 +153,3 @@ **Since:** 1.0.0 | ||
```typescript | ||
deleteFile(options: FileDeleteOptions) => Promise<void> | ||
deleteFile(options: DeleteFileOptions) => Promise<void> | ||
``` | ||
@@ -111,3 +161,3 @@ | ||
| ------------- | --------------------------------------------------------------- | | ||
| **`options`** | <code><a href="#filedeleteoptions">FileDeleteOptions</a></code> | | ||
| **`options`** | <code><a href="#deletefileoptions">DeleteFileOptions</a></code> | | ||
@@ -247,10 +297,10 @@ **Since:** 1.0.0 | ||
```typescript | ||
checkPermissions() => Promise<FilesystemPermissionStatus> | ||
checkPermissions() => Promise<PermissionStatus> | ||
``` | ||
Check read/write permissions. | ||
Required on Android, only when using <a href="#filesystemdirectory">FilesystemDirectory.Documents</a> or | ||
FilesystemDirectory.ExternalStorage. | ||
Required on Android, only when using <a href="#directory">`Directory.Documents`</a> or | ||
`Directory.ExternalStorage`. | ||
**Returns:** <code>Promise<<a href="#filesystempermissionstatus">FilesystemPermissionStatus</a>></code> | ||
**Returns:** <code>Promise<<a href="#permissionstatus">PermissionStatus</a>></code> | ||
@@ -265,10 +315,10 @@ **Since:** 1.0.0 | ||
```typescript | ||
requestPermissions() => Promise<FilesystemPermissionStatus> | ||
requestPermissions() => Promise<PermissionStatus> | ||
``` | ||
Request read/write permissions. | ||
Required on Android, only when using <a href="#filesystemdirectory">FilesystemDirectory.Documents</a> or | ||
FilesystemDirectory.ExternalStorage. | ||
Required on Android, only when using <a href="#directory">`Directory.Documents`</a> or | ||
`Directory.ExternalStorage`. | ||
**Returns:** <code>Promise<<a href="#filesystempermissionstatus">FilesystemPermissionStatus</a>></code> | ||
**Returns:** <code>Promise<<a href="#permissionstatus">PermissionStatus</a>></code> | ||
@@ -283,3 +333,3 @@ **Since:** 1.0.0 | ||
#### FileReadResult | ||
#### ReadFileResult | ||
@@ -291,12 +341,12 @@ | Prop | Type | Description | Since | | ||
#### FileReadOptions | ||
#### ReadFileOptions | ||
| Prop | Type | Description | Since | | ||
| --------------- | ------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- | | ||
| **`path`** | <code>string</code> | The path of the file to read | 1.0.0 | | ||
| **`directory`** | <code><a href="#filesystemdirectory">FilesystemDirectory</a></code> | The <a href="#filesystemdirectory">FilesystemDirectory</a> to read the file from | 1.0.0 | | ||
| **`encoding`** | <code><a href="#filesystemencoding">FilesystemEncoding</a></code> | The encoding to read the file in, if not provided, data is read as binary and returned as base64 encoded. Pass <a href="#filesystemencoding">FilesystemEncoding.UTF8</a> to read data as string | 1.0.0 | | ||
| Prop | Type | Description | Since | | ||
| --------------- | ----------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- | | ||
| **`path`** | <code>string</code> | The path of the file to read | 1.0.0 | | ||
| **`directory`** | <code><a href="#directory">Directory</a></code> | The <a href="#directory">`Directory`</a> to read the file from | 1.0.0 | | ||
| **`encoding`** | <code><a href="#encoding">Encoding</a></code> | The encoding to read the file in, if not provided, data is read as binary and returned as base64 encoded. Pass <a href="#encoding">Encoding.UTF8</a> to read data as string | 1.0.0 | | ||
#### FileWriteResult | ||
#### WriteFileResult | ||
@@ -308,29 +358,29 @@ | Prop | Type | Description | Since | | ||
#### FileWriteOptions | ||
#### WriteFileOptions | ||
| Prop | Type | Description | Default | Since | | ||
| --------------- | ------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | ----- | | ||
| **`path`** | <code>string</code> | The path of the file to write | | 1.0.0 | | ||
| **`data`** | <code>string</code> | The data to write | | 1.0.0 | | ||
| **`directory`** | <code><a href="#filesystemdirectory">FilesystemDirectory</a></code> | The <a href="#filesystemdirectory">FilesystemDirectory</a> to store the file in | | 1.0.0 | | ||
| **`encoding`** | <code><a href="#filesystemencoding">FilesystemEncoding</a></code> | The encoding to write the file in. If not provided, data is written as base64 encoded. Pass <a href="#filesystemencoding">FilesystemEncoding.UTF8</a> to write data as string | | 1.0.0 | | ||
| **`recursive`** | <code>boolean</code> | Whether to create any missing parent directories. | <code>false</code> | 1.0.0 | | ||
| Prop | Type | Description | Default | Since | | ||
| --------------- | ----------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | ----- | | ||
| **`path`** | <code>string</code> | The path of the file to write | | 1.0.0 | | ||
| **`data`** | <code>string</code> | The data to write | | 1.0.0 | | ||
| **`directory`** | <code><a href="#directory">Directory</a></code> | The <a href="#directory">`Directory`</a> to store the file in | | 1.0.0 | | ||
| **`encoding`** | <code><a href="#encoding">Encoding</a></code> | The encoding to write the file in. If not provided, data is written as base64 encoded. Pass <a href="#encoding">Encoding.UTF8</a> to write data as string | | 1.0.0 | | ||
| **`recursive`** | <code>boolean</code> | Whether to create any missing parent directories. | <code>false</code> | 1.0.0 | | ||
#### FileAppendOptions | ||
#### AppendFileOptions | ||
| Prop | Type | Description | Since | | ||
| --------------- | ------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- | | ||
| **`path`** | <code>string</code> | The path of the file to append | 1.0.0 | | ||
| **`data`** | <code>string</code> | The data to write | 1.0.0 | | ||
| **`directory`** | <code><a href="#filesystemdirectory">FilesystemDirectory</a></code> | The <a href="#filesystemdirectory">FilesystemDirectory</a> to store the file in | 1.0.0 | | ||
| **`encoding`** | <code><a href="#filesystemencoding">FilesystemEncoding</a></code> | The encoding to write the file in. If not provided, data is written as base64 encoded. Pass <a href="#filesystemencoding">FilesystemEncoding.UTF8</a> to write data as string | 1.0.0 | | ||
| Prop | Type | Description | Since | | ||
| --------------- | ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ----- | | ||
| **`path`** | <code>string</code> | The path of the file to append | 1.0.0 | | ||
| **`data`** | <code>string</code> | The data to write | 1.0.0 | | ||
| **`directory`** | <code><a href="#directory">Directory</a></code> | The <a href="#directory">`Directory`</a> to store the file in | 1.0.0 | | ||
| **`encoding`** | <code><a href="#encoding">Encoding</a></code> | The encoding to write the file in. If not provided, data is written as base64 encoded. Pass FilesystemEncoding.UTF8 to write data as string | 1.0.0 | | ||
#### FileDeleteOptions | ||
#### DeleteFileOptions | ||
| Prop | Type | Description | Since | | ||
| --------------- | ------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ----- | | ||
| **`path`** | <code>string</code> | The path of the file to delete | 1.0.0 | | ||
| **`directory`** | <code><a href="#filesystemdirectory">FilesystemDirectory</a></code> | The <a href="#filesystemdirectory">FilesystemDirectory</a> to delete the file from | 1.0.0 | | ||
| Prop | Type | Description | Since | | ||
| --------------- | ----------------------------------------------- | ---------------------------------------------------------------- | ----- | | ||
| **`path`** | <code>string</code> | The path of the file to delete | 1.0.0 | | ||
| **`directory`** | <code><a href="#directory">Directory</a></code> | The <a href="#directory">`Directory`</a> to delete the file from | 1.0.0 | | ||
@@ -340,7 +390,7 @@ | ||
| Prop | Type | Description | Default | Since | | ||
| --------------- | ------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | ------------------ | ----- | | ||
| **`path`** | <code>string</code> | The path of the new directory | | 1.0.0 | | ||
| **`directory`** | <code><a href="#filesystemdirectory">FilesystemDirectory</a></code> | The <a href="#filesystemdirectory">FilesystemDirectory</a> to make the new directory in | | 1.0.0 | | ||
| **`recursive`** | <code>boolean</code> | Whether to create any missing parent directories as well. | <code>false</code> | 1.0.0 | | ||
| Prop | Type | Description | Default | Since | | ||
| --------------- | ----------------------------------------------- | --------------------------------------------------------------------- | ------------------ | ----- | | ||
| **`path`** | <code>string</code> | The path of the new directory | | 1.0.0 | | ||
| **`directory`** | <code><a href="#directory">Directory</a></code> | The <a href="#directory">`Directory`</a> to make the new directory in | | 1.0.0 | | ||
| **`recursive`** | <code>boolean</code> | Whether to create any missing parent directories as well. | <code>false</code> | 1.0.0 | | ||
@@ -350,7 +400,7 @@ | ||
| Prop | Type | Description | Default | Since | | ||
| --------------- | ------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | ------------------ | ----- | | ||
| **`path`** | <code>string</code> | The path of the directory to remove | | 1.0.0 | | ||
| **`directory`** | <code><a href="#filesystemdirectory">FilesystemDirectory</a></code> | The <a href="#filesystemdirectory">FilesystemDirectory</a> to remove the directory from | | 1.0.0 | | ||
| **`recursive`** | <code>boolean</code> | Whether to recursively remove the contents of the directory | <code>false</code> | 1.0.0 | | ||
| Prop | Type | Description | Default | Since | | ||
| --------------- | ----------------------------------------------- | --------------------------------------------------------------------- | ------------------ | ----- | | ||
| **`path`** | <code>string</code> | The path of the directory to remove | | 1.0.0 | | ||
| **`directory`** | <code><a href="#directory">Directory</a></code> | The <a href="#directory">`Directory`</a> to remove the directory from | | 1.0.0 | | ||
| **`recursive`** | <code>boolean</code> | Whether to recursively remove the contents of the directory | <code>false</code> | 1.0.0 | | ||
@@ -367,6 +417,6 @@ | ||
| Prop | Type | Description | Since | | ||
| --------------- | ------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----- | | ||
| **`path`** | <code>string</code> | The path of the directory to read | 1.0.0 | | ||
| **`directory`** | <code><a href="#filesystemdirectory">FilesystemDirectory</a></code> | The <a href="#filesystemdirectory">FilesystemDirectory</a> to list files from | 1.0.0 | | ||
| Prop | Type | Description | Since | | ||
| --------------- | ----------------------------------------------- | ----------------------------------------------------------- | ----- | | ||
| **`path`** | <code>string</code> | The path of the directory to read | 1.0.0 | | ||
| **`directory`** | <code><a href="#directory">Directory</a></code> | The <a href="#directory">`Directory`</a> to list files from | 1.0.0 | | ||
@@ -383,6 +433,6 @@ | ||
| Prop | Type | Description | Since | | ||
| --------------- | ------------------------------------------------------------------- | -------------------------------------------------------------------------------- | ----- | | ||
| **`path`** | <code>string</code> | The path of the file to get the URI for | 1.0.0 | | ||
| **`directory`** | <code><a href="#filesystemdirectory">FilesystemDirectory</a></code> | The <a href="#filesystemdirectory">FilesystemDirectory</a> to get the file under | 1.0.0 | | ||
| Prop | Type | Description | Since | | ||
| --------------- | ----------------------------------------------- | -------------------------------------------------------------- | ----- | | ||
| **`path`** | <code>string</code> | The path of the file to get the URI for | 1.0.0 | | ||
| **`directory`** | <code><a href="#directory">Directory</a></code> | The <a href="#directory">`Directory`</a> to get the file under | 1.0.0 | | ||
@@ -403,6 +453,6 @@ | ||
| Prop | Type | Description | Since | | ||
| --------------- | ------------------------------------------------------------------- | -------------------------------------------------------------------------------- | ----- | | ||
| **`path`** | <code>string</code> | The path of the file to get data about | 1.0.0 | | ||
| **`directory`** | <code><a href="#filesystemdirectory">FilesystemDirectory</a></code> | The <a href="#filesystemdirectory">FilesystemDirectory</a> to get the file under | 1.0.0 | | ||
| Prop | Type | Description | Since | | ||
| --------------- | ----------------------------------------------- | -------------------------------------------------------------- | ----- | | ||
| **`path`** | <code>string</code> | The path of the file to get data about | 1.0.0 | | ||
| **`directory`** | <code><a href="#directory">Directory</a></code> | The <a href="#directory">`Directory`</a> to get the file under | 1.0.0 | | ||
@@ -412,21 +462,34 @@ | ||
| Prop | Type | Description | Since | | ||
| ----------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----- | | ||
| **`from`** | <code>string</code> | The existing file or directory | 1.0.0 | | ||
| **`to`** | <code>string</code> | The destination file or directory | 1.0.0 | | ||
| **`directory`** | <code><a href="#filesystemdirectory">FilesystemDirectory</a></code> | The <a href="#filesystemdirectory">FilesystemDirectory</a> containing the existing file or directory | 1.0.0 | | ||
| **`toDirectory`** | <code><a href="#filesystemdirectory">FilesystemDirectory</a></code> | The <a href="#filesystemdirectory">FilesystemDirectory</a> containing the destination file or directory. If not supplied will use the 'directory' parameter as the destination | 1.0.0 | | ||
| Prop | Type | Description | Since | | ||
| ----------------- | ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----- | | ||
| **`from`** | <code>string</code> | The existing file or directory | 1.0.0 | | ||
| **`to`** | <code>string</code> | The destination file or directory | 1.0.0 | | ||
| **`directory`** | <code><a href="#directory">Directory</a></code> | The <a href="#directory">`Directory`</a> containing the existing file or directory | 1.0.0 | | ||
| **`toDirectory`** | <code><a href="#directory">Directory</a></code> | The <a href="#directory">`Directory`</a> containing the destination file or directory. If not supplied will use the 'directory' parameter as the destination | 1.0.0 | | ||
#### FilesystemPermissionStatus | ||
#### PermissionStatus | ||
| Prop | Type | | ||
| ------------------- | ---------------- | | ||
| **`publicStorage`** | <code>any</code> | | ||
| Prop | Type | | ||
| ------------------- | ----------------------------------------------------------- | | ||
| **`publicStorage`** | <code><a href="#permissionstate">PermissionState</a></code> | | ||
### Type Aliases | ||
#### RenameOptions | ||
<code><a href="#copyoptions">CopyOptions</a></code> | ||
#### PermissionState | ||
<code>'prompt' | 'prompt-with-rationale' | 'granted' | 'denied'</code> | ||
### Enums | ||
#### FilesystemDirectory | ||
#### Directory | ||
@@ -442,3 +505,3 @@ | Members | Value | Description | Since | | ||
#### FilesystemEncoding | ||
#### Encoding | ||
@@ -445,0 +508,0 @@ | Members | Value | Description | Since | |
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
223306
29
3560
493