emacs-devel
[Top][All Lists]
Advanced

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

Re: empty-directory predicate, native implementation


From: Arthur Miller
Subject: Re: empty-directory predicate, native implementation
Date: Tue, 13 Oct 2020 22:08:33 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Michael Albinus <michael.albinus@gmx.de>
>> Cc: Arthur Miller <arthur.miller@live.com>,  emacs-devel@gnu.org
>> Date: Tue, 13 Oct 2020 20:44:18 +0200
>> 
>> > As a bonus, we will be able to return the file names we read, not just
>> > ignore them.
>> 
>> I agree with your proposal. However, I don't see why it is a bonus to
>> know which file names have read already, because they are taken in
>> random order.
>
> The order depends on the filesystem.  For example, MS-Windows
> filesystems always report in alphabetic order.
>
Not that it is important, just as a note:

I looked up today msdn while I was playing with this, they mention that
order is not guarantueed at all; FAT systems will returned file in order
they are written on disk, while on NTFS & CDFS they are usually returned
in alphabetical order. I don't know why they say "usually" :-), but they
do remark that any application should sort results if sorted order is
important.

https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-findnextfilea

>> I fail to see how does it help, whether a file name is returned
>> under the first N matches, or not.
>
> Well, it is easy to disregard the names if they aren't needed.
I am not sure of use-case, but it can be a bonus to get N number of
files instead of all. If Elisp was used for scripting in some very large
filesystems maybe? I don't know.




reply via email to

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