emacs-devel
[Top][All Lists]
Advanced

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

AW: Can't interrupt directory_files_internal run fromtimer-event-handler


From: klaus.berndl
Subject: AW: Can't interrupt directory_files_internal run fromtimer-event-handler
Date: Mon, 8 Aug 2005 13:27:46 +0200

>>>     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.

>A combination of file-attributes (looking at the number of links) and
>directory-files should do that, I think.

Hmm, maybe i oversee something here - but when you have to call
directory-files - where is the improvement compared to the problem of the OP?
`directory-files' IS the problem....

Ciao,
Klaus

>> 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?

>I'm not an expert on this, but I think it's impossible to create such
>alternate names, since GNU Find uses this fact to detect directories
>with no subdirectories.


_______________________________________________
Emacs-devel mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/emacs-devel


reply via email to

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