pub struct AppPaths { /* private fields */ }Expand description
Canonical locations belonging to one Larust application.
Keeping these paths together avoids a subtle class of bugs where config,
migrations, storage, and static files resolve against different working
directories. Application::new() still uses the current directory for
backwards compatibility; production binaries and tests can instead call
Application::at_root(...).
Implementations§
Source§impl AppPaths
impl AppPaths
pub fn new(root: impl Into<PathBuf>) -> Self
pub fn root(&self) -> &Path
pub fn env(&self) -> PathBuf
pub fn public(&self) -> PathBuf
pub fn storage(&self) -> PathBuf
pub fn database(&self) -> PathBuf
Sourcepub fn logs(&self) -> PathBuf
pub fn logs(&self) -> PathBuf
storage/logs - where crate::logging’s file/stack channel writes
larust.log, mirroring storage/releases’s own precedent as an
established storage/<subdir> convention.
Sourcepub fn sessions(&self) -> PathBuf
pub fn sessions(&self) -> PathBuf
storage/sessions - where larust_http::session::FileSessionStore
writes one file per session when SESSION_DRIVER=file (see
Config::session_driver’s own doc comment). Same flat
storage/<subdir> convention logs()/storage/releases already
use - not Laravel’s own extra storage/framework/ nesting level,
which this codebase has never adopted for any of its own
framework-owned directories.