[Python-ideas] Please consider skipping hidden directories in os.walk, os.fwalk, etc.
random832 at fastmail.com
Tue May 8 11:45:17 EDT 2018
On Mon, May 7, 2018, at 02:05, Steve Barnes wrote:
> In a lot of uses of os.walk it is desirable to skip version control
> directories, (which are usually hidden directories), to the point that
> almost all of the examples given look like:
CVS isn't a hidden directory on Linux. Maybe it can be on windows, but it probably won't be if it's manually created, which you mentioned issues with below. There's probably a discussion we should be having about exposing these system-specific attributes, but they really can't be a general solution for the problem you have.
MacOS, incidentally, has two distinct attributes for hiding files [chflags hidden and setfile -a V], along with a ".private" file that can be in a directory containing a list of filenames to hide.
More information about the Python-ideas