[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can't interrupt directory_files_internal run from timer-event-handle

From: Richard M. Stallman
Subject: Re: Can't interrupt directory_files_internal run from timer-event-handler
Date: Sun, 07 Aug 2005 13:15:29 -0400

    There's no need to run any program just to know if a directory is
    empty.  Emacs has primitives which will tell that directly (e.g.,
    file-attributes) and do that faster.

How do you determine that from file-attributes?  It is not obvious.
You might try to do it from the number of hard links to the directory,
which will normally be 2 for an empty directory, since users normally
can't create alternate names for a directory.  But isn't it possible
for root to create them?  Then an empty directory could have a link count
greater than two.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]