Class: LocalFileAbstraction

March 10, 2023 · View on GitHub

node-taglib-sharp / Exports / LocalFileAbstraction

Class: LocalFileAbstraction

This class implements IFileAbstraction to provide support for accessing the local/ standard file. This class is used as the standard file abstraction throughout the library.

Implements

Table of contents

Constructors

Accessors

Methods

Constructors

constructor

new LocalFileAbstraction(path)

Constructs and initializes a new instance from a specified path in the local file system

Throws

Error Thrown if path is falsy

Parameters

NameTypeDescription
pathstringPath of the file to use in the new instance

Accessors

name

get name(): string

Name or identifier used by the implementation

Returns

string

Implementation of

IFileAbstraction.name


readStream

get readStream(): IStream

Readable, seekable stream for the file referenced by the current instance.

Returns

IStream

Implementation of

IFileAbstraction.readStream


writeStream

get writeStream(): IStream

Writable, seekable stream for the file referenced by the current instance.

Returns

IStream

Implementation of

IFileAbstraction.writeStream

Methods

closeStream

closeStream(stream): void

Closes a stream created by the current instance.

Parameters

NameTypeDescription
streamIStreamStream created by the current instance.

Returns

void

Implementation of

IFileAbstraction.closeStream