On 5/24/25 7:19 PM, Chris Angelico via Python-list wrote:
> On Sun, 25 May 2025 at 10:05, Rob Cliffe via Python-list
> <python-list@python.org> wrote:
>> Yes, but if I understand correctly, they all start from a single
>> directory (and work downwards if required).
>> My suggestion involved searching a *list* (possibly multiple lists) of
>> directories.
> 
> for dir in dirs:
>     try: open(dir + "/" + fn).close()
>     except FileNotFoundError: pass
>     else: break
> 
> Is this really all that difficult? Not everything has to be in the stdlib.

That would modify atime on unix file systems, no?  Of course most modern
file systems on SSDs are mounted with noatime, but still.

-- 
https://mail.python.org/mailman3//lists/python-list.python.org

Reply via email to