safely reading directory contents

Posted by Jack on Stack Overflow See other posts from Stack Overflow or by Jack
Published on 2010-03-23T16:45:16Z Indexed on 2010/03/24 8:23 UTC
Read the original article Hit count: 122

Filed under:
|
|
|

Is it safe to read directory entries via readdir() or scandir() while files are being created/deleted in this directory? Should I prefer one over the other?

When I say "safe" I mean entries returned by these functions are valid and can be operated without crushing the program.

Thanks.

© Stack Overflow or respective owner

Related posts about c

    Related posts about glibs