delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/11/05/12:30:07.1

Date: Thu, 5 Nov 1998 19:24:14 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: DJ Delorie <dj AT delorie DOT com>
cc: djgpp-workers AT delorie DOT com
Subject: readdir and hidden files
Message-ID: <Pine.SUN.3.91.981105191624.7106P-100000@is>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com

Does anybody remember why readdir by default skips hidden files?  Is it 
only for the startup code which expands wildcards?  If so, we can do it 
specifically in the startup code.

The problem with this behavior is that many (most?) applications want to 
disable it.  One example is Emacs, in its Directory Edit mode or when it 
auto-completes on file names: if Emacs doesn't see the hidden 
directories/files, it cannot display them at all.  Another example is 
`diff' when it's used to compare directories: hidden files aren't 
compared at all.  There are other examples as well.

In my experience, even if an application sometimes hides files from the 
user, like `ls' without -a, it has an option to show them.  So the 
application level is the one that decides whether or not to show the 
files.

All these cases usually need to set the special __OPENDIR bit in 
opendir_flags, which requires DJGPP-specific hacks.  It is best avoided.  
Can we remove this feature in v2.02?

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019