Home Reference Source Repository

Function

Static Public Summary
public

Note that Bash version 4.3 (at minimum) is required.

public

buildDirectories(basePath: string, directoryList: Array<string>): Observable<string>

Builds a set of directories within a base path.

public

Build a set of test files.

public

buildFiles(basePath: string, fileList: Array<string>): Observable<string>

Only simple content is written to the file.

public

buildSymLinks(basePath: string, symLinkList: Array<Array<string>>): Observable<string>

Builds a set of symbolic links within a base path.

public

Removes all files from a path.

public

Normalizes a path to use forward (Unix-style) slashes.

Static Public

public bashFileSearch(pattern: string, basedir: string): Observable<SearchResult> source

import {bashFileSearch} from 'test-files-rx/src/bash-file-search.js'

Note that Bash version 4.3 (at minimum) is required. This version does not follow symlinks. Also, since OSX by default has an older version of bash, the function assumes that the "homebrew install bash" was used to install bash into "/usr/local/bin/bash".

Params:

NameTypeAttributeDescription
pattern string

A glob pattern to search for.

basedir string

The base directory to start the search from.

Return:

Observable<SearchResult>

An observable containing the SearchResult result object.

public buildDirectories(basePath: string, directoryList: Array<string>): Observable<string> source

import {buildDirectories} from 'test-files-rx/src/test-file-builder.js'

Builds a set of directories within a base path.

Params:

NameTypeAttributeDescription
basePath string

The path in which to build directories.

directoryList Array<string>

An array of directory names to build within the path. Any paths included in the name should be relative to the base path.

Return:

Observable<string>

An observable for the build operation.

public buildFileSet(fileSet: FileSet): Observable<string> source

import {buildFileSet} from 'test-files-rx/src/test-file-builder.js'

Build a set of test files.

Params:

NameTypeAttributeDescription
fileSet FileSet

Options describing the set of files to build.

Return:

Observable<string>

An observable for the build operation.

public buildFiles(basePath: string, fileList: Array<string>): Observable<string> source

import {buildFiles} from 'test-files-rx/src/test-file-builder.js'

Only simple content is written to the file.

Params:

NameTypeAttributeDescription
basePath string

The path in which to build files.

fileList Array<string>

An array of file names to build within the path. Any paths included in the name should be relative to the base path.

Return:

Observable<string>

An observable for the build operation.

import {buildSymLinks} from 'test-files-rx/src/test-file-builder.js'

Builds a set of symbolic links within a base path.

Params:

NameTypeAttributeDescription
basePath string

The path in which to build files.

symLinkList Array<Array<string>>

An array of pairs of names to build within the path, where the first item is the source of the link and the second item is the path that the link points to.

Return:

Observable<string>

An observable for the build operation.

public cleanPath(basePath: string): Observable<string> source

import {cleanPath} from 'test-files-rx/src/test-file-builder.js'

Removes all files from a path.

Params:

NameTypeAttributeDescription
basePath string

The path to be cleaned.

Return:

Observable<string>

An observable for the clean operation.

public unixStylePath(path: string): string source

import {unixStylePath} from 'test-files-rx/src/test-file-builder.js'

Normalizes a path to use forward (Unix-style) slashes.

Params:

NameTypeAttributeDescription
path string

The path to be normalized.

Return:

string

A normalized path.