uutils / findutils

Rust implementation of findutils
MIT License
280 stars 35 forks source link

Implement `-fprint` #381

Open hanbings opened 1 month ago

hanbings commented 1 month ago

refer: https://www.gnu.org/software/findutils/manual/html_node/find_html/Print-File-Name.html

Action: -fprint file

True; print the entire file name into file file, followed by a newline. 
If file does not exist when find is run, it is created; if it does exist, it is truncated to 0 bytes. 
The named output file is always created, even if no output is sent to it. 
The file names /dev/stdout and /dev/stderr are handled specially; 
they refer to the standard output and standard error output, respectively.

If there is the faintest possibility that 
one of the files for which you are searching might contain a newline, 
you should use ‘-fprint0’ instead.
radhesh1 commented 4 days ago

this is fairly simple i think

radhesh1 commented 4 days ago

i could add a bit for file in in printer.rs

hanbings commented 4 days ago

i could add a bit for file in in printer.rs

sure, go ahead :)

radhesh1 commented 4 days ago

im made some addition to printer

radhesh1 commented 4 days ago

just need to add them to mod.rs

radhesh1 commented 4 days ago

i just need to see if the tests run or not

radhesh1 commented 4 days ago

okay so i need to make sure everything is gnu ok