Use when working with file paths in Stacks — 100+ framework-aware path builder functions for every directory in the project (actions, app, config, database, models, routes, storage, etc.), plus Node.js path utilities (join, resolve, basename, dirname, etc.). Covers @stacksjs/path.
100+ path builder functions for every framework directory.
storage/framework/core/path/src/basename, delimiter, dirname, extname, isAbsolute, join, normalize, parse, relative, resolve, sep, toNamespacedPath
All accept an optional relative path suffix and return absolute paths.
appPath('Models') // ~/app/Models
userActionsPath() // ~/app/Actions
userComponentsPath() // ~/app/Components
userViewsPath() // ~/app/Views
userFunctionsPath() // ~/app/Functions
userJobsPath() // ~/app/Jobs
userControllersPath() // ~/app/Controllers
userListenersPath() // ~/app/Listeners
userMiddlewarePath() // ~/app/Middleware
userModelsPath() // ~/app/Models
userNotificationsPath() // ~/app/Notifications
userDatabasePath() // ~/database
userMigrationsPath() // ~/database/migrations
userEventsPath() // ~/app/Events.ts
actionsPath() // ~/storage/framework/core/actions
buddyPath() // ~/storage/framework/core/buddy
runtimePath() // ~/storage/framework/core/buddy
buildPath() // ~/storage/framework/core/build
cachePath() // ~/storage/framework/cache
cloudPath() // ~/cloud
frameworkCloudPath() // ~/storage/framework/cloud
libsPath() // ~/storage/framework/libs
aiPath() analyticsPath() aliasPath()
arraysPath() authPath() browserPath()
cliPath() chatPath() collectionsPath()
configPath() databasePath() datetimePath()
dnsPath() docsPath() emailPath()
enumsPath() envPath() errorHandlingPath()
eventsPath() fakerPath() gitPath()
healthPath() httpPath() i18nPath()
lintPath() loggingPath() notificationsPath()
objectsPath() ormPath() pathPath()
paymentsPath() pluginsPath() pushPath()
queuePath() realtimePath() routerPath()
schedulerPath() searchEnginePath() securityPath()
serverPath() shellPath() slugPath()
smsPath() socialsPath() storagePath()
stringsPath() testingPath() tinkerPath()
tunnelPath() typesPath() uiPath()
utilsPath() validationPath() whoisPath()
assetsPath() // ~/resources/assets
resourcesPath() // ~/resources
publicPath() // ~/public
localesPath() // ~/locales
routesPath() // ~/routes
buildEnginePath()
libsEntriesPath()
frameworkPath() // ~/storage/framework
corePath() // ~/storage/framework/core
defaultsPath() // ~/storage/framework/defaults
defaultsAppPath()
defaultsResourcesPath()
Most paths have relative* variants:
relativeActionsPath()
relativeAppPath()
appPath('Models/User.ts') // ~/app/Models/User.ts
databasePath('migrations') // ~/storage/framework/core/database/migrations
configPath('app.ts') // ~/config/app.ts
@stacksjs/path instead of Node's path for framework pathsrelative* variants return paths relative to project rootuser*Path() functions point to application-level directories (app/)built*Path() functions point to compiled output directoriesoptions with relative flag