On 2/23/2017 10:48 AM, Mark S Waterbury wrote:
In addition to "." and ".." (the short-cut symbolic links to the
current and parent directory), in Unix systems, by convention, if the
file name begins with a ".", it is considered to be a "hidden" file, so
perhaps you might not want to process those files?

In that case, you could just check if the first character of the name is
a "." and if so, skip that file, and that will also take care of "."
and ".." too.

Mark makes a good point: you may not want to process sub-directories. I
use the stat() API and test st_objtype = '*DIR'.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.