# FAST touch(1) file utility for CI jobs [![Crates.io Version](https://img.shields.io/crates/v/touch-cli)](https://crates.io/crates/touch-cli) [![MIT/Apache License](https://img.shields.io/crates/l/touch-cli)](https://spdx.org/licenses/MIT.html) [![Crates.io MSRV](https://img.shields.io/crates/msrv/touch-cli?logo=rust&label=MSRV&labelColor=orange)](https://blog.rust-lang.org/2023/12/28/Rust-1.75.0.html) [![Safe Rust](https://img.shields.io/badge/Rust-safe-brightgreen.svg)](https://doc.rust-lang.org/nomicon/meet-safe-and-unsafe.html) [![Lines of code](https://tokei.rs/b1/gitlab/hsn10/touch-rs?category=code)](https://github.com/XAMPPRocky/tokei) [![Crates.io Downloads](https://img.shields.io/crates/d/touch-cli)](https://crates.io/crates/touch-cli) This is Rust rewrite of classic POSIX `touch`(1) file utility for changing file timestamps. The `touch` utility modifies file timestamps, allowing you to change access and modification times. See [manpage](https://man7.org/linux/man-pages/man1/touch.1.html) of GNU coreutils version. Works natively on Windows and Unix. This Rust performance rewrite version uses [tokio](https://tokio.rs/) multi threaded backend for processing *multiple files concurrently* which gives it major speedups compared to other *touch* programs. This is especially visible when working on network attached NFS or SMB drives. This speedups makes it highly suitable for use in CI jobs, where you are billed per second. For filename mask specification *touch-cli* uses [glob format](https://docs.rs/glob/latest/glob/struct.Pattern.html) from [glob crate](https://crates.io/crates/glob). Glob format supports *recursive* touch (example: _**/*.d_) It allows you to update timestamps for files within subdirectories as well. ### Command Line parameters [Glob patterns](https://docs.rs/glob/latest/glob/struct.Pattern.html) and following options are supported as command line arguments. Program uses [getopt3](https://gitlab.com/hsn10/getopt3) for options parsing, which have support for some extended parsing features such as grouping of options. 1. -c do not create any files 1. -a change only the access time 1. -m change only the modification time 1. -f ignored 1. -v output version and exit Default is to create new files and change both access and modification times. ### Exit values 0. Task completed without errors 1. No mandatory file or pattern command line arguments supplied 2. Glob command line expressions is wrong. Check proper syntax of [glob pattern](https://docs.rs/glob/latest/glob/struct.Pattern.html). 3. Error while applying changes to file system