mirror of
https://github.com/veeso/termscp.git
synced 2025-12-07 09:36:00 -08:00
Working on Host
This commit is contained in:
@@ -24,12 +24,13 @@
|
||||
*/
|
||||
|
||||
use std::path::PathBuf;
|
||||
use std::time::Instant;
|
||||
use std::time::SystemTime;
|
||||
|
||||
/// ## FsEntry
|
||||
///
|
||||
/// FsEntry represents a generic entry in a directory
|
||||
|
||||
#[derive(Clone)]
|
||||
pub enum FsEntry {
|
||||
Directory(FsDirectory),
|
||||
File(FsFile)
|
||||
@@ -39,11 +40,12 @@ pub enum FsEntry {
|
||||
///
|
||||
/// Directory provides an interface to file system directories
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct FsDirectory {
|
||||
pub name: PathBuf,
|
||||
pub last_change_time: Instant,
|
||||
pub last_access_time: Instant,
|
||||
pub creation_time: Instant,
|
||||
pub last_change_time: SystemTime,
|
||||
pub last_access_time: SystemTime,
|
||||
pub creation_time: SystemTime,
|
||||
pub readonly: bool,
|
||||
pub symlink: Option<PathBuf>, // UNIX only
|
||||
pub user: Option<String>, // UNIX only
|
||||
@@ -55,13 +57,14 @@ pub struct FsDirectory {
|
||||
///
|
||||
/// FsFile provides an interface to file system files
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct FsFile {
|
||||
pub name: PathBuf,
|
||||
pub last_change_time: Instant,
|
||||
pub last_access_time: Instant,
|
||||
pub creation_time: Instant,
|
||||
pub last_change_time: SystemTime,
|
||||
pub last_access_time: SystemTime,
|
||||
pub creation_time: SystemTime,
|
||||
pub size: usize,
|
||||
pub ftype: String, // File type
|
||||
pub ftype: Option<String>, // File type
|
||||
pub readonly: bool,
|
||||
pub symlink: Option<PathBuf>, // UNIX only
|
||||
pub user: Option<String>, // UNIX only
|
||||
|
||||
Reference in New Issue
Block a user