Skip to content

Commit

Permalink
Update docs for ospect::fs::mounts.
Browse files Browse the repository at this point in the history
  • Loading branch information
panhania committed Oct 20, 2023
1 parent 8e7c1eb commit 99c169f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions crates/ospect/src/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,15 +199,16 @@ pub struct Mount {
pub fs_type: String,
}

// TODO(@panhania): Add information about Windows once it is supported.
/// Returns an iterator over mounted filesystems information.
///
/// The exact behaviour is system specific:
///
/// * On Linux it parses `/proc/mounts` entries (or alternatives).
/// * On macOS it uses the [`getmntinfo`] call.
/// * On macOS it uses the [`getmntinfo`][1] call.
/// * On Windows it uses [volume managemend functions][2].
///
/// [`getmntinfo`]: https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man3/getmntinfo.3.html
/// [1]: https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man3/getmntinfo.3.html
/// [2]: https://learn.microsoft.com/en-us/windows/win32/fileio/volume-management-functions
pub fn mounts() -> std::io::Result<impl Iterator<Item = std::io::Result<Mount>>> {
self::sys::mounts()
}
Expand Down

0 comments on commit 99c169f

Please sign in to comment.