Skip to content

Commit

Permalink
tail/paths: Add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Joining7943 committed Jan 8, 2023
1 parent 158d1d3 commit b4a5566
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/uu/tail/src/paths.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,23 @@ use std::os::unix::fs::{FileTypeExt, MetadataExt};
use std::path::{Path, PathBuf};
use uucore::error::UResult;

/// The kind of input, either a `File` or `Stdin` defining an [`Input`] .
#[derive(Debug, Clone)]
pub enum InputKind {
File(PathBuf),
Stdin,
}

/// Represent an input from the command line arguments.
///
/// Is composed of an [`InputKind`] and a display name.
#[derive(Debug, Clone)]
pub struct Input {
kind: InputKind,
pub display_name: String,
}

// TODO: move above Input
pub enum Opened {
File(File),
Fifo(File),
Expand Down

0 comments on commit b4a5566

Please sign in to comment.