Create Files unit to manage filesystem implementations defined in config

This commit is contained in:
2021-03-29 11:12:16 -05:00
parent 6f73df3465
commit e772d12f20
3 changed files with 159 additions and 0 deletions

View File

@@ -28,6 +28,22 @@ export function env(key: string, defaultValue?: any): any {
return Application.getApplication().env(key, defaultValue)
}
/**
* Helper function for fetching a universal path relative to the root of the application.
* @param parts
*/
export function basePath(...parts: PathLike[]): UniversalPath {
return Application.getApplication().path(...parts)
}
/**
* Helper function for fetching a universal path relative to the `app/` directory.
* @param parts
*/
export function appPath(...parts: PathLike[]): UniversalPath {
return Application.getApplication().appPath(...parts)
}
/**
* The main application container.
*/