import {FileSystem} from '@serenity-js/core/lib/io'
public class | source

FileSystem

Tests:

Constructor Summary

Public Constructor
public

Method Summary

Public Methods
public

createReadStream(relativeOrAbsolutePathToFile: Path): *

public

createWriteStreamTo(relativeOrAbsolutePathToFile: Path): *

public

ensureDirectoryExistsAt(relativeOrAbsolutePathToDirectory: Path): Promise

public

exists(relativeOrAbsolutePathToFile: Path): boolean

public

remove(relativeOrAbsolutePathToFileOrDirectory: Path): Promise

public

rename(source: Path, destination: Path): Promise

public

stat(relativeOrAbsolutePathToFile: Path): Promise

public

store(relativeOrAbsolutePathToFile: Path, data: undefined | , encoding: WriteFileOptions): Promise

public

tempFilePath(prefix: undefined, suffix: undefined): Path

Public Constructors

public constructor() source

Public Methods

public createReadStream(relativeOrAbsolutePathToFile: Path): * source

Params:

NameTypeAttributeDescription
relativeOrAbsolutePathToFile Path

Returns:

*

public createWriteStreamTo(relativeOrAbsolutePathToFile: Path): * source

Params:

NameTypeAttributeDescription
relativeOrAbsolutePathToFile Path

Returns:

*

public ensureDirectoryExistsAt(relativeOrAbsolutePathToDirectory: Path): Promise source

Params:

NameTypeAttributeDescription
relativeOrAbsolutePathToDirectory Path

Returns:

Promise

public exists(relativeOrAbsolutePathToFile: Path): boolean source

Params:

NameTypeAttributeDescription
relativeOrAbsolutePathToFile Path

Returns:

boolean

public remove(relativeOrAbsolutePathToFileOrDirectory: Path): Promise source

Params:

NameTypeAttributeDescription
relativeOrAbsolutePathToFileOrDirectory Path

Returns:

Promise

public rename(source: Path, destination: Path): Promise source

Params:

NameTypeAttributeDescription
source Path
destination Path

Returns:

Promise

public stat(relativeOrAbsolutePathToFile: Path): Promise source

Params:

NameTypeAttributeDescription
relativeOrAbsolutePathToFile Path

Returns:

Promise

public store(relativeOrAbsolutePathToFile: Path, data: undefined | , encoding: WriteFileOptions): Promise source

Params:

NameTypeAttributeDescription
relativeOrAbsolutePathToFile Path
data undefined |
encoding WriteFileOptions

Returns:

Promise

public tempFilePath(prefix: undefined, suffix: undefined): Path source

Params:

NameTypeAttributeDescription
prefix undefined
suffix undefined

Returns:

Path