aspen-core
Options
All
  • Public
  • Public/Protected
  • All
Menu

A 'raw' minimal description of file or directory

This will be converted to either FileEntry or Directory object

It does not need to be serializable

Hierarchy

  • IFileEntryItem

Index

Properties

Properties

Optional metadata

metadata: object

Optional Metadata/Attributes

Can be literally anything. aspen does not use this data in any way or shape.

This object will set initial metadata.

Additional metadata can be added using FileEntry#addMetadata (existing metadata can be updated using same method).

You can get the value of key using FileEntry#getMetadata. And can be removed using FileEntry#removeMetadata

You can use Root#onDidChangeMetadata hook to get notified whenever a FileEntry's metadata is changed, added or removed.

Examples:

  • Your own state tracking systems
  • Your own event management stuff
  • ctime, mtime, size, you name it

Type declaration

  • [key: string]: any

name

name: string

Name of the file or directory

If a path is given, it'll work fine as the basename will be extracted automatically

type

type: FileType

Type of file

Avoid hardcoding the numerical value, instead, use the FileType enum to select either File or Directory

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc