FileSystem
Module | ejs.io |
Namespace | "ejs.io" |
Definition | class FileSystem |
Inheritance | FileSystem ![]() |
Spec ejs-12.
Properties
Qualifiers | Property | Type | Description |
---|---|---|---|
No properties defined |
FileSystem Methods
Qualifiers | Method |
---|---|
FileSystem(path: Object) | |
Create a new FileSystem object based on the given path. | |
public get | hasDrives(): Boolean |
Determine if path names have a drive specifications (C:). | |
public set | newline(terminator: String): Void |
Set the new line characters to use for this file system. | |
public get | newline(): String |
Return the new line characters for this file system. | |
public get | root(): Path |
Return the root directory of the file system. | |
public get | separators(): String |
Return the path segment separators. | |
public set | separators(sep: String): Void |
Set the path segment separators. |
Method Detail
FileSystem(path: Object)
Create a new FileSystem object based on the given path.
- Parameters
path: Object String or Path of the file system
get public hasDrives(): Boolean
Determine if path names have a drive specifications (C:).
- Description
- Only relevant on Windows like file systems.
- Returns
- True if the file path has a drive spec.
Set the new line characters to use for this file system.
- Parameters
terminator: String the new line termination characters Usually "\n" or "\r\n"
get public newline(): String
Return the new line characters for this file system.
- Returns
- The new line delimiting characters Usually "\n" or "\r\n".
get public root(): Path
Return the root directory of the file system.
- Returns
- A Path which represents the file system.
get public separators(): String
Return the path segment separators.
- Returns
- The path segment separators. The first character is the default separator. Usually "/" or "\\".
Set the path segment separators.
- Description
- The first separator is the default separator.
- Parameters
sep: String the new path segment separator. Usually "/" or "/\\"