@gauravachhani/file-electron
v0.0.4
Published
Plugin helps you to use remote, fs and path modules for electron 10+
Downloads
15
Readme
@gauravachhani/file-electron
Plugin helps you to use remote, fs and path modules for electron 10+
Install
npm install @gauravachhani/file-electron
npx cap sync
API
echo(...)
userPath()
resolvePath(...)
joinPath(...)
existsSync(...)
copyFile(...)
_mkdirSyncRecursive(...)
_copyRecursiveSync(...)
writeFile(...)
readFile(...)
moveFile(...)
removeFile(...)
renameFile(...)
readdirSync(...)
echo(...)
echo(options: { value: string; }) => Promise<{ value: string; }>
| Param | Type |
| ------------- | ------------------------------- |
| options
| { value: string; } |
Returns: Promise<{ value: string; }>
userPath()
userPath() => Promise<{ value: string; }>
Returns: Promise<{ value: string; }>
resolvePath(...)
resolvePath(options?: { target: string; source: string; } | undefined) => Promise<any>
| Param | Type |
| ------------- | ------------------------------------------------ |
| options
| { target: string; source: string; } |
Returns: Promise<any>
joinPath(...)
joinPath(options?: { target: string; source: string; } | undefined) => Promise<any>
| Param | Type |
| ------------- | ------------------------------------------------ |
| options
| { target: string; source: string; } |
Returns: Promise<any>
existsSync(...)
existsSync(path: string) => Promise<any>
| Param | Type |
| ---------- | ------------------- |
| path
| string |
Returns: Promise<any>
copyFile(...)
copyFile(source: string, target: string) => Promise<any>
| Param | Type |
| ------------ | ------------------- |
| source
| string |
| target
| string |
Returns: Promise<any>
_mkdirSyncRecursive(...)
_mkdirSyncRecursive(source: string) => Promise<any>
| Param | Type |
| ------------ | ------------------- |
| source
| string |
Returns: Promise<any>
_copyRecursiveSync(...)
_copyRecursiveSync(source: string, target: string) => Promise<any>
| Param | Type |
| ------------ | ------------------- |
| source
| string |
| target
| string |
Returns: Promise<any>
writeFile(...)
writeFile(path: string, data: any, options: any) => Promise<any>
| Param | Type |
| ------------- | ------------------- |
| path
| string |
| data
| any |
| options
| any |
Returns: Promise<any>
readFile(...)
readFile(path: string, options: any) => Promise<any>
| Param | Type |
| ------------- | ------------------- |
| path
| string |
| options
| any |
Returns: Promise<any>
moveFile(...)
moveFile(source: string, destination: string) => Promise<any>
| Param | Type |
| ----------------- | ------------------- |
| source
| string |
| destination
| string |
Returns: Promise<any>
removeFile(...)
removeFile(path: string) => Promise<any>
| Param | Type |
| ---------- | ------------------- |
| path
| string |
Returns: Promise<any>
renameFile(...)
renameFile(oldPath: string, oldName: string, newPath: string, newName: string) => Promise<any>
| Param | Type |
| ------------- | ------------------- |
| oldPath
| string |
| oldName
| string |
| newPath
| string |
| newName
| string |
Returns: Promise<any>
readdirSync(...)
readdirSync(path: string) => Promise<any>
| Param | Type |
| ---------- | ------------------- |
| path
| string |
Returns: Promise<any>