Skip to content
Snippets Groups Projects
  • Florian Fischer's avatar
    b0438822
    fsearch: write only found files to stdout and use implicit file offset · b0438822
    Florian Fischer authored
    In the emper-fs-eval I would like to validate the output of the fsearch
    variants against a list of known files. Not writing any log messages to
    stdout make that easier.
    
    Use -1 as the offset of the write to stdout.
    Passing offset -1 means to use the file's implicit offset just like write(2).
    When using a tty as stdout offset 0 is fine but when redirecting stdout
    to a file 0 will cause that previously found paths will always be
    overwritten.
    b0438822
    History
    fsearch: write only found files to stdout and use implicit file offset
    Florian Fischer authored
    In the emper-fs-eval I would like to validate the output of the fsearch
    variants against a list of known files. Not writing any log messages to
    stdout make that easier.
    
    Use -1 as the offset of the write to stdout.
    Passing offset -1 means to use the file's implicit offset just like write(2).
    When using a tty as stdout offset 0 is fine but when redirecting stdout
    to a file 0 will cause that previously found paths will always be
    overwritten.
fsearch.cpp 3.91 KiB