pub struct DiskSpace<M = Unselected> { /* private fields */ }Expand description
Type-safe builder for p4 diskspace.
p4 df is an alias for p4 diskspace.
§Syntax
p4 [g-opts] diskspace [P4ROOT | P4JOURNAL | P4LOG | TEMP | journalPrefix | depot]Shows summary information about the current availability of disk space on the server.
The output of p4 diskspace is in the form:
name (type type) : xxx GB free, yyy GB used, zzz GB total (ff % full)Where name can be either P4ROOT, P4JOURNAL, P4LOG, TEMP, a prefix to a non-default P4 Server journal file location, or the name of a P4 Server depot. The filesystem type is that reported by the operating system.
If no arguments are specified, disk space information is displayed for all objects.
By default, P4 Server rejects commands when free space on the filesystems housing the P4ROOT, P4JOURNAL, P4LOG, or TEMP falls below 10 megabytes. To change this behavior, set the filesys.P4ROOT.min (and corresponding) configurables to your desired limits.
If the user account that runs the P4 Server is subject to disk quotas, the filesys.*.min configurables reflect those quotas, regardless of how much physical space actually remains on the filesystem(s) in question.
§Note
Server releases prior to 16.1 included reserved space in the number displayed for used space in the Size column for Unix filesystems. This has been changed so that the size given now excludes reserved space.
The M type parameter tracks the target at compile time. Unselected
(the state returned by DiskSpace::new) spawns the bare command, which
reports disk space for every object, and can also be spawned with an
arbitrary target argument through
ParameterizedSpawn with a one-element tuple, or
SpawnExt1; that covers a journalPrefix or a
depot name. Use DiskSpace::report_p4root, DiskSpace::report_p4journal,
DiskSpace::report_p4log, or DiskSpace::report_temp to select one of
the predefined targets; those states spawn without arguments.
Implementations§
Source§impl DiskSpace<Unselected>
impl DiskSpace<Unselected>
Sourcepub fn new(bin: impl Into<PathBuf>, global_opts: GlobalOpts) -> Self
pub fn new(bin: impl Into<PathBuf>, global_opts: GlobalOpts) -> Self
Creates a new p4 diskspace command.
bin is the path to the Perforce command-line executable. The
resulting command has no target argument and reports disk space for
every object.