1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
//! !! API not stabilized - lacking documentation - do not use !!
//!
//! ## About
//!
//! Pipelight_utils is a crate that gather a set of trivial utilities for command line tools.
//!
//! These are the most cleaned up modules coming from and named after
//! [pipelight](https://github.com/pipelight/pipelight), a tiny automation tool.
//!
//! ## Teleport - find a file recursively.
//!
//! You can browse the filesystem for a configuration file.
//!
//! ```rust
//! # use miette::Report;
//! use pipelight_utils::teleport::Portal;
//!
//! let mut portal = Portal::new()?;
//! // Set a pattern to search for.
//! portal.seed("pipelight").search()?;
//!
//! // Get the file path
//! let file_path = portal.target.file_path.clone().unwrap();
//! // Get the directory path
//! let directory_path = portal.target.directory_path.clone().unwrap();
//!
//! // Go to the target directory
//! portal.teleport()?;
//! // Go back to the origin directory
//! portal.origin()?;
//!
//! # Ok::<(), Report>(())
//! ```
//!
//! <img src="" alt="pretty parsing error report">
//!
//! ## Git - easy git repo manipulation.
//!
//! ```rust
//! # use miette::Report;
//! use pipelight_utils::git::Git;
//!
//! let repo = Git::new();
//! let branch = repo.get_branch()?;
//! let tag = repo.get_tag()?;
//! let commit = repo.get_commit()?;
//!
//! # Ok::<(), Report>(())
//! ```
pub use FileType;