Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

constructor

Properties

path

path: string

Path to node.

Protected sophy

Sophy instance.

Readonly type

type: NodeType = NodeType.Directory

Node type.

Accessors

name

  • get name(): string

parentPath

  • get parentPath(): string

Methods

append

  • append(contents: string): Promise<this>

copy

  • copy(newPath: string): Promise<this>

delete

  • delete(): Promise<void>

getMime

  • getMime(): Promise<string | false>

getSize

  • getSize(): Promise<number>

isDirectory

  • isDirectory(): this is Directory

isExists

  • isExists(): Promise<boolean>

isFile

  • isFile(): this is File

move

  • move(newPath: string): Promise<this>

prepend

  • prepend(contents: string): Promise<this>
  • Prepend a contents to file.

    Parameters

    • contents: string

      Prepend contents.

    Returns Promise<this>

read

  • read(): Promise<string>

readStream

  • readStream(): Stream

setPath

  • setPath(path: string): void

write

  • write(contents: string): Promise<this>

writeStream

  • writeStream(): Stream

Generated using TypeDoc