Skip to main content

Module storage

Module storage 

Source

Structs§

Disk
DiskConfig
One named disk’s declaration inside a FilesystemConfig - a root path and, for a publicly-served disk, the URL prefix files under it are reachable at. Built with DiskConfig::private/DiskConfig::public rather than a struct literal, mirroring local()/public()’s own private-vs-served distinction (url_prefix: None vs Some(..)) so a config-declared disk can’t accidentally end up in a state neither of the two built-in disks can.
FilesystemConfig
A named collection of additional disks, declared by the app itself (typically in a config/filesystems.rs it writes, the same “add-your-own-config-file-when-you-need-it” pattern config/blog.rs- style app-specific config already establishes) - see this module’s own doc comment for why this exists alongside, not instead of, local()/public().

Functions§

local
Root: storage/app/ (Laravel’s own convention) - private, never served. url() always returns None on the disk this returns.
local_at
Returns the private disk rooted below an explicit application root.
public
Root: public/ - this framework’s existing static-file docroot. url() returns a /-prefixed, directly request-usable path.
public_at
Returns the public disk rooted below an explicit application root. Use this with Application::paths() when a binary is launched from a directory other than its project root.