diff --git a/.travis.yml b/.travis.yml index be5737d..2ee5d44 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,3 +28,5 @@ deploy: secure: kbZJ1CW2+QAk2u4UWOJehF0gliR/l5JeVmewf/eXKnGttdcJrkIQ70D0F+Rhu4/ZJOlvNpTFLpt3MIKyL3LnjbwO9Q4pDsCjSCRnswz/UkRfzoaY1sL07sesAdEnGCDTwdSEueL1dpmlC46wPbe/7ErnPOxFiMgtR+nX6X6O8u8shSs2T2B5ltnatHo9+pnY28u+EDg4kzdGkP63kt66x5npkNVD3IXuRXIh02YAYzuUnZbMm7vmbg5DdefyYfYvCaHW3udL344iBtxDybYlw+C+TSlEUQ8o/lIC9dXg7RFgsHrXgiwo5S9qyUr+Vuq0VdYQe5qW885hOqxVLBWyGImka/gRFcRRfgoD2WUIF1WWvivqV2iDXF6KzYG4iikPlbbF2+zssfVkxCAQUILn7nFxxKtQzeVfogP2tW1U+UfmIyRdnpxRuV7SpfvUkNhYBQWG9Qv1hJ0gT4EH5HxKsyo3iRYF3Yfw6yRtzsjk0BAmqKz5sKNjubyd7y/s4uc61KR2xZnaw7ipIZ/NABLHqbahTPdreEW9SnysQOuWCgciTyMyiTMm08vPxIEDi770VXcvgrr662xTYJvb0+7yPcuL0uv2i9nfdl22/P9IpaGCSLl3HnUp0G8xxdcSD6vZ/6eMDZmye6Nlorg4RKvwVcpHzp8HaQ5lDpfKKmDo2GU= on: tags: true +notifications: + email: false diff --git a/src/fs/mod.rs b/src/fs/mod.rs new file mode 100644 index 0000000..1126a39 --- /dev/null +++ b/src/fs/mod.rs @@ -0,0 +1,61 @@ +//! ## Fs +//! +//! `fs` is the module which provides file system entities + +/* +* +* Copyright (C) 2020 Christian Visintin - christian.visintin1997@gmail.com +* +* This file is part of "TermSCP" +* +* TermSCP is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* TermSCP is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with TermSCP. If not, see . +* +*/ + +use std::path::PathBuf; +use std::time::Instant; + +/// ## FsDirectory +/// +/// Directory provides an interface to file system directories + +pub struct FsDirectory { + pub name: PathBuf, + pub last_change_time: Instant, + pub last_access_time: Instant, + pub creation_time: Instant, + pub readonly: bool, + pub symlink: Option, // UNIX only + pub user: Option, // UNIX only + pub group: Option, // UNIX only + pub unix_pex: Option<(u8, u8, u8)>, // UNIX only +} + +/// ### FsFile +/// +/// FsFile provides an interface to file system files + +pub struct FsFile { + pub name: PathBuf, + pub last_change_time: Instant, + pub last_access_time: Instant, + pub creation_time: Instant, + pub size: usize, + pub ftype: String, // File type + pub readonly: bool, + pub symlink: Option, // UNIX only + pub user: Option, // UNIX only + pub group: Option, // UNIX only + pub unix_pex: Option<(u8, u8, u8)>, // UNIX only +}