mirror of
https://github.com/Llewellynvdm/exa.git
synced 2025-02-10 22:38:55 +00:00
Some explanatory comments
This commit is contained in:
parent
5537dd9b99
commit
d82e7b8e5c
@ -135,6 +135,10 @@ pub enum Size {
|
|||||||
///
|
///
|
||||||
/// This is what ls does as well. Without it, the devices will just have
|
/// This is what ls does as well. Without it, the devices will just have
|
||||||
/// file sizes of zero.
|
/// file sizes of zero.
|
||||||
|
///
|
||||||
|
/// You can see what these device numbers mean:
|
||||||
|
/// - http://www.lanana.org/docs/device-list/
|
||||||
|
/// - http://www.lanana.org/docs/device-list/devices-2.6+.txt
|
||||||
DeviceIDs {
|
DeviceIDs {
|
||||||
major: u8,
|
major: u8,
|
||||||
minor: u8,
|
minor: u8,
|
||||||
|
@ -259,11 +259,14 @@ impl<'dir> File<'dir> {
|
|||||||
f::Group(self.metadata.gid())
|
f::Group(self.metadata.gid())
|
||||||
}
|
}
|
||||||
|
|
||||||
/// This file's size, if it's a regular file.
|
/// This file’s size, if it’s a regular file.
|
||||||
///
|
///
|
||||||
/// For directories, no size is given. Although they do have a size on
|
/// For directories, no size is given. Although they do have a size on
|
||||||
/// some filesystems, I've never looked at one of those numbers and gained
|
/// some filesystems, I’ve never looked at one of those numbers and gained
|
||||||
/// any information from it. So it's going to be hidden instead.
|
/// any information from it. So it’s going to be hidden instead.
|
||||||
|
///
|
||||||
|
/// Block and character devices return their device IDs, because they
|
||||||
|
/// usually just have a file size of zero.
|
||||||
pub fn size(&self) -> f::Size {
|
pub fn size(&self) -> f::Size {
|
||||||
if self.is_directory() {
|
if self.is_directory() {
|
||||||
f::Size::None
|
f::Size::None
|
||||||
|
Loading…
x
Reference in New Issue
Block a user