|
|
@@ -427,6 +427,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())
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
// To display icons for empty folders.
|
|
|
#[cfg(unix)]
|
|
|
pub fn is_empty_dir(&self) -> bool {
|
|
|
@@ -466,16 +476,6 @@ 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.
|
|
|
pub fn modified_time(&self) -> Option<SystemTime> {
|
|
|
if self.is_link() && self.deref_links {
|