mirror of
https://github.com/Llewellynvdm/exa.git
synced 2024-11-25 13:27:33 +00:00
Try to fix CI
This commit is contained in:
parent
33dd8fd2ca
commit
e874584a55
@ -325,15 +325,8 @@ impl<'dir> File<'dir> {
|
|||||||
///
|
///
|
||||||
/// Block and character devices return their device IDs, because they
|
/// Block and character devices return their device IDs, because they
|
||||||
/// usually just have a file size of zero.
|
/// usually just have a file size of zero.
|
||||||
pub fn size(&self) -> f::Size {
|
|
||||||
#[cfg(windows)]
|
|
||||||
if self.is_directory() {
|
|
||||||
f::Size::None
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
f::Size::Some(self.metadata.len())
|
|
||||||
}
|
|
||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
|
pub fn size(&self) -> f::Size {
|
||||||
if self.is_directory() {
|
if self.is_directory() {
|
||||||
f::Size::None
|
f::Size::None
|
||||||
}
|
}
|
||||||
@ -349,6 +342,16 @@ impl<'dir> File<'dir> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(windows)]
|
||||||
|
pub fn size(&self) -> f::Size {
|
||||||
|
if self.is_directory() {
|
||||||
|
f::Size::None
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
f::Size::Some(self.metadata.len())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// This file’s last modified timestamp, if available on this platform.
|
/// This file’s last modified timestamp, if available on this platform.
|
||||||
pub fn modified_time(&self) -> Option<SystemTime> {
|
pub fn modified_time(&self) -> Option<SystemTime> {
|
||||||
self.metadata.modified().ok()
|
self.metadata.modified().ok()
|
||||||
@ -394,18 +397,6 @@ impl<'dir> File<'dir> {
|
|||||||
/// This is used a the leftmost character of the permissions column.
|
/// This is used a the leftmost character of the permissions column.
|
||||||
/// The file type can usually be guessed from the colour of the file, but
|
/// The file type can usually be guessed from the colour of the file, but
|
||||||
/// ls puts this character there.
|
/// ls puts this character there.
|
||||||
#[cfg(windows)]
|
|
||||||
pub fn type_char(&self) -> f::Type {
|
|
||||||
if self.is_file() {
|
|
||||||
f::Type::File
|
|
||||||
}
|
|
||||||
else if self.is_directory() {
|
|
||||||
f::Type::Directory
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
f::Type::Special
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
pub fn type_char(&self) -> f::Type {
|
pub fn type_char(&self) -> f::Type {
|
||||||
if self.is_file() {
|
if self.is_file() {
|
||||||
@ -434,6 +425,19 @@ impl<'dir> File<'dir> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(windows)]
|
||||||
|
pub fn type_char(&self) -> f::Type {
|
||||||
|
if self.is_file() {
|
||||||
|
f::Type::File
|
||||||
|
}
|
||||||
|
else if self.is_directory() {
|
||||||
|
f::Type::Directory
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
f::Type::Special
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// This file’s permissions, with flags for each bit.
|
/// This file’s permissions, with flags for each bit.
|
||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
pub fn permissions(&self) -> f::Permissions {
|
pub fn permissions(&self) -> f::Permissions {
|
||||||
|
@ -78,6 +78,7 @@ impl SortField {
|
|||||||
"age" | "old" | "oldest" => {
|
"age" | "old" | "oldest" => {
|
||||||
Self::ModifiedAge
|
Self::ModifiedAge
|
||||||
}
|
}
|
||||||
|
|
||||||
"ch" | "changed" => {
|
"ch" | "changed" => {
|
||||||
Self::ChangedDate
|
Self::ChangedDate
|
||||||
}
|
}
|
||||||
|
@ -235,18 +235,6 @@ impl<'a, 'dir, C: Colours> FileName<'a, 'dir, C> {
|
|||||||
|
|
||||||
/// The character to be displayed after a file when classifying is on, if
|
/// The character to be displayed after a file when classifying is on, if
|
||||||
/// the file’s type has one associated with it.
|
/// the file’s type has one associated with it.
|
||||||
#[cfg(windows)]
|
|
||||||
fn classify_char(&self) -> Option<&'static str> {
|
|
||||||
if self.file.is_directory() {
|
|
||||||
Some("/")
|
|
||||||
}
|
|
||||||
else if self.file.is_link() {
|
|
||||||
Some("@")
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
None
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
fn classify_char(&self) -> Option<&'static str> {
|
fn classify_char(&self) -> Option<&'static str> {
|
||||||
if self.file.is_executable_file() {
|
if self.file.is_executable_file() {
|
||||||
@ -269,6 +257,19 @@ impl<'a, 'dir, C: Colours> FileName<'a, 'dir, C> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(windows)]
|
||||||
|
fn classify_char(&self) -> Option<&'static str> {
|
||||||
|
if self.file.is_directory() {
|
||||||
|
Some("/")
|
||||||
|
}
|
||||||
|
else if self.file.is_link() {
|
||||||
|
Some("@")
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
None
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// Returns at least one ANSI-highlighted string representing this file’s
|
/// Returns at least one ANSI-highlighted string representing this file’s
|
||||||
/// name using the given set of colours.
|
/// name using the given set of colours.
|
||||||
///
|
///
|
||||||
|
Loading…
Reference in New Issue
Block a user