@gik/tools-streamer
v0.0.11
Published
RXjs extra operators. Part of our [tools suite](https://github.com/gikmx/tools).
Downloads
2
Maintainers
Readme
@gik/tools-streamer 0.0.11
RXjs extra operators. Part of our tools suite.
Contributors
Supported platforms
- darwin
- linux
Table of contents
- streamer An utility belt for our most common operations with RXJS's Observables.
- fromAccess
member
Determine if given path is accessible. - fromStat
member
Determine statistics about a file system node. - fromSpawn
member
Spawn a shell command. - fromDirMake
member
Creates a directory. - fromDirRequire
member
Requires a directory path, if the directory does not exists, it's created. - fromDirRead
member
Get path of nodes in given directory (non recursively). - fromDirReadRecursive
member
Get path of nodes in given directory (recursively). - fromFileRead
member
Reads a file from the disk. - fromFileWrite
member
Writes a file on the disk.
- fromAccess
streamer
An utility belt for our most common operations with RXJS's Observables.
To do
- [ ] Add unit tests for all operators.
Members
- fromAccess
- fromStat
- fromSpawn
- fromDirMake
- fromDirRequire
- fromDirRead
- fromDirReadRecursive
- fromFileRead
- fromFileWrite
fromAccess
static property of
streamer
Determine if given path is accessible.
Parameters
Returns
StreamBoolean
- Wether the file is accessible or not.
fromStat
static property of
streamer
Determine statistics about a file system node.
Parameters
Returns
StreamStat
- stat object for the node.
Throws
Error
- When given an invalid node.
fromSpawn
static property of
streamer
Spawn a shell command.
Parameters
Returns
StreamOutput
- Each chunk of either stdout or stderr data.
fromDirMake
static property of
streamer
Creates a directory.
Parameters
Returns
StreamString
- The path of the directory that was just created.
Throws
Error
- When directory cannot be created.
fromDirRequire
static property of
streamer
Requires a directory path, if the directory does not exists, it's created.
Parameters
Returns
Array.<StreamString>
- The path of the directory.
Throws
Error
- When requested path exists and is not a directory.
fromDirRead
static property of
streamer
Get path of nodes in given directory (non recursively).
Parameters
Returns
Array.<StreamDirNode>
- The path of the directory.
Throws
Error
- When requested path exists and is not a directory.
fromDirReadRecursive
static property of
streamer
Get path of nodes in given directory (recursively).
Parameters
Returns
StreamPath
- The path of the directory.
Throws
Error
- When requested path exists and is not a directory.
fromFileRead
static property of
streamer
Reads a file from the disk.
Parameters
Returns
Observable.<string>
- The contents of the file.
fromFileWrite
static property of
streamer
Writes a file on the disk.
Parameters
Returns
Observable.<string>
- The future value true
if write was succesful.
Throws
Error
- When the file cannot be written.
Types
Members
NodeOutput
static typedef of
Types
Properties
NodePath
static typedef of
Types
Properties
StreamBoolean
static typedef of
Types
StreamString
static typedef of
Types
StreamStat
static typedef of
Types
A stream containing stat from node.
StreamOutput
static typedef of
Types
A stream containing stat from node.
StreamPath
static typedef of
Types
A stream containing stat from node.
StreamParamError
static typedef of
Types
Thrown when a parameter is not the correct type.