1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-29 12:07:46 +00:00

df: add documentation comments for filesystem.rs

This commit is contained in:
Jeffrey Finkelstein 2022-03-12 17:06:41 -05:00
parent 2fac674317
commit b81f4ef6a7

View file

@ -2,6 +2,11 @@
// *
// * For the full copyright and license information, please view the LICENSE
// * file that was distributed with this source code.
//! Provides a summary representation of a filesystem.
//!
//! A [`Filesystem`] struct represents a device containing a
//! filesystem mounted at a particular directory. It also includes
//! information on amount of space available and amount of space used.
#[cfg(windows)]
use std::path::Path;
@ -9,9 +14,19 @@ use std::path::Path;
use uucore::fsext::statfs;
use uucore::fsext::{FsUsage, MountInfo};
/// Summary representation of a filesystem.
///
/// A [`Filesystem`] struct represents a device containing a
/// filesystem mounted at a particular directory. The
/// [`Filesystem::mount_info`] field exposes that information. The
/// [`Filesystem::usage`] field provides information on the amount of
/// space available on the filesystem and the amount of space used.
#[derive(Debug, Clone)]
pub(crate) struct Filesystem {
/// Information about the mounted device, mount directory, and related options.
pub mount_info: MountInfo,
/// Information about the amount of space used on the filesystem.
pub usage: FsUsage,
}