pub struct ListCLI {
pub format: Option<ListFormat>,
pub sort: Option<ListSortCriteria>,
pub no_summary: bool,
pub show_directories: bool,
pub show_dot_files: bool,
pub include_git_files: bool,
pub targets: Option<Vec<String>>,
}
Expand description
List files and their actual and cached metadata.
By default, it produces a list of files and directories in the current directory. The list can be formatted by using the –format option. The default format can be set in the config file.
The command doesn’t compute the actual content digest if it’s not requested in the format string.
By default the list is not sorted. You can use the –sort option to sort the list by name, size or timestamp.
Fields§
§format: Option<ListFormat>
A string for each row of the output table
The following are the keys for each row:
- {{acd8}}: actual content digest from the workspace file. First 8 digits.
- {{acd64}}: actual content digest. All 64 digits.
- {{aft}}: actual file type. Whether the entry is a file (F), directory (D), symlink (S), hardlink (H) or reflink (R).
- {{asz}}: actual size. The size of the workspace file in bytes. It uses MB, GB and TB to represent sizes larger than 1MB.
- {{ats}}: actual timestamp. The timestamp of the workspace file.
- {{name}}: The name of the file or directory.
- {{cst}}: cache status. One of “=”, “>”, “<”, or “X” to show whether the file timestamp is the same as the cached timestamp, newer, older, and not tracked.
- {{rcd8}}: recorded content digest stored in the cache. First 8 digits.
- {{rcd64}}: recorded content digest stored in the cache. All 64 digits.
- {{rrm}}: recorded recheck method. Whether the entry is linked to the workspace as a copy (C), symlink (S), hardlink (H) or reflink (R).
- {{rsz}}: recorded size. The size of the cached content in bytes. It uses MB, GB and TB to represent sizes larged than 1MB.
- {{rts}}: recorded timestamp. The timestamp of the cached content.
The default format can be set with file.list.format in the config file.
TODO: Think how to add a completion to ListFormat
sort: Option<ListSortCriteria>
Sort criteria.
It can be one of none (default), name-asc, name-desc, size-asc, size-desc, ts-asc, ts-desc.
The default option can be set with file.list.sort in the config file.
no_summary: bool
Don’t show total number and size of the listed files.
The default option can be set with file.list.no_summary in the config file.
show_directories: bool
Don’t hide directories
Directories are not listed by default. This flag lists them.
show_dot_files: bool
Don’t hide dot files
If not supplied, hides dot files like .gitignore and .xvcignore
include_git_files: bool
List files tracked by Git.
By default, Xvc doesn’t list files tracked by Git. Supply this option to list them.
targets: Option<Vec<String>>
Files/directories to list.
If not supplied, lists all files under the current directory.
Trait Implementations§
Source§impl Args for ListCLI
impl Args for ListCLI
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command
so it can instantiate self
via
FromArgMatches::update_from_arg_matches_mut
Read moreSource§impl CommandFactory for ListCLI
impl CommandFactory for ListCLI
Source§impl FromArgMatches for ListCLI
impl FromArgMatches for ListCLI
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches
to self
.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches
to self
.Source§impl Parser for ListCLI
impl Parser for ListCLI
Source§fn parse_from<I, T>(itr: I) -> Self
fn parse_from<I, T>(itr: I) -> Self
Source§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
Source§fn update_from<I, T>(&mut self, itr: I)
fn update_from<I, T>(&mut self, itr: I)
Source§impl UpdateFromXvcConfig for ListCLI
impl UpdateFromXvcConfig for ListCLI
Source§fn update_from_conf(self, conf: &XvcConfig) -> XvcConfigResult<Box<Self>>
fn update_from_conf(self, conf: &XvcConfig) -> XvcConfigResult<Box<Self>>
impl Eq for ListCLI
impl StructuralPartialEq for ListCLI
Auto Trait Implementations§
impl Freeze for ListCLI
impl RefUnwindSafe for ListCLI
impl Send for ListCLI
impl Sync for ListCLI
impl Unpin for ListCLI
impl UnwindSafe for ListCLI
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more