mirror of
https://github.com/uutils/coreutils
synced 2024-12-18 17:14:42 +00:00
0999b00ff9
Reorganize the code in `truncate.rs` into three distinct functions representing the three modes of operation of the `truncate` program. The three modes are - `truncate -r RFILE FILE`, which sets the length of `FILE` to match the length of `RFILE`, - `truncate -r RFILE -s NUM FILE`, which sets the length of `FILE` relative to the given `RFILE`, - `truncate -s NUM FILE`, which sets the length of `FILE` either absolutely or relative to its curent length. This organization of the code makes it more concise and easier to follow. |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |