Function
Static Public Summary | ||
public |
fileNameOf(input: object): string From a normalized input file name, return the file name string. |
|
public |
Get stats for a file (including symbolic links) |
|
public |
Make directories, including all that don't exist. |
|
public |
normalizeInput(input: string | object): object Normalize an input file name |
|
public |
readFileRx(input: object | string, options: string): Observable<object> Read the contents of a file. |
|
public |
Rename or move a file or directory. |
|
public |
Use rimraf to delete all files and directories. |
|
public |
Get stats for a file. |
|
public |
Delete a file. |
|
public |
writeFileRx(input: object | string, content: string | Buffer, options: string): Observable<object> Write the contents of a file. |
Static Public
public fileNameOf(input: object): string source
import {fileNameOf} from 'fs-rx/src/normalize-input.js'
From a normalized input file name, return the file name string.
Params:
Name | Type | Attribute | Description |
input | object | A normalized file name with a basedir and name property. |
public lstatRx(input: object | string): Observable<object> source
import {lstatRx} from 'fs-rx/src/stat-file.js'
Get stats for a file (including symbolic links)
Params:
Name | Type | Attribute | Description |
input | object | string | The file name to obtain stats for. |
Return:
Observable<object> | An observable containing the file name object that includes a stats property with the stats obtained. The stats will be for the symbolic link (using lstat) if applicable. |
public mkdirpRx(input: string, options: string): Observable<object> source
import {mkdirpRx} from 'fs-rx/src/mkdirp-path.js'
Make directories, including all that don't exist.
public normalizeInput(input: string | object): object source
import {normalizeInput} from 'fs-rx/src/normalize-input.js'
Normalize an input file name
Params:
Name | Type | Attribute | Description |
input | string | object | Either a file name (relative to the current working directory) or an object with a basedir and name property (like what is returned from the globRx function). |
public readFileRx(input: object | string, options: string): Observable<object> source
import {readFileRx} from 'fs-rx/src/read-file.js'
Read the contents of a file.
Params:
Name | Type | Attribute | Description |
input | object | string | The file name to read. |
|
options | string | Options (not required) that are passed to the readFile function. |
Return:
Observable<object> | An observable containing the file name object that includes either a content property (for string contents) or a buffer property (if the file is read as as Node Buffer object). |
public renameRx(input: object | string, newPath: string): Observable<object> source
import {renameRx} from 'fs-rx/src/rename-file.js'
Rename or move a file or directory.
Params:
Name | Type | Attribute | Description |
input | object | string | The file or directory name to rename. |
|
newPath | string | The path to rename to. |
Return:
Observable<object> | An observable containing the file name object, where the name is derived from the newPath relative to the basedir. |
public rimrafRx(input: string, options: object): Observable<object> source
import {rimrafRx} from 'fs-rx/src/rimraf-path.js'
Use rimraf to delete all files and directories.
public statRx(input: object | string): Observable<object> source
import {statRx} from 'fs-rx/src/stat-file.js'
Get stats for a file.
Params:
Name | Type | Attribute | Description |
input | object | string | The file name to obtain stats for. |
Return:
Observable<object> | An observable containing the file name object that includes a stats property with the stats obtained. |
public unlinkRx(input: object | string): Observable<object> source
import {unlinkRx} from 'fs-rx/src/unlink-file.js'
Delete a file.
Params:
Name | Type | Attribute | Description |
input | object | string | The file name to delete. |
public writeFileRx(input: object | string, content: string | Buffer, options: string): Observable<object> source
import {writeFileRx} from 'fs-rx/src/write-file.js'
Write the contents of a file.
Params:
Name | Type | Attribute | Description |
input | object | string | The file name to write. |
|
content | string | Buffer | Data to write. |
|
options | string | Options (not required) that are passed to the writeFile function. |