Create Files unit to manage filesystem implementations defined in config
This commit is contained in:
@@ -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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user