mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-01-31 18:49:43 +08:00
parent
754c5ecbcb
commit
47f48bae8d
@ -171,7 +171,6 @@ export interface Flags {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface WriteOptions {
|
export interface WriteOptions {
|
||||||
create?: boolean;
|
|
||||||
replace?: boolean;
|
replace?: boolean;
|
||||||
append?: boolean;
|
append?: boolean;
|
||||||
truncate?: number; // if present, number of bytes to truncate file to before writing
|
truncate?: number; // if present, number of bytes to truncate file to before writing
|
||||||
@ -799,7 +798,7 @@ export class File {
|
|||||||
* @returns {Promise<void>} Returns a Promise that resolves or rejects with an error.
|
* @returns {Promise<void>} Returns a Promise that resolves or rejects with an error.
|
||||||
*/
|
*/
|
||||||
static writeExistingFile(path: string, fileName: string, text: string | Blob): Promise<void> {
|
static writeExistingFile(path: string, fileName: string, text: string | Blob): Promise<void> {
|
||||||
return File.writeFile(path, fileName, text, { create: false });
|
return File.writeFile(path, fileName, text, { replace: true });
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user