Closed jonatanklosko closed 4 months ago
Maybe we implement File.compare? Then it could be used for sorting in the future too.
I'm not sure if there's a one natural order for files if they come from different file systems. It could make sense to sort by path first, but it could also make sense to group files from the same file system and sort by path within that. Sorting by & &1.path
is straightforward and explicit. I would start with File.equal?
, once we have that it's easy to replace if we decide to :D
Sounds good to me!
As of #2239 files with the same path created in different processes fail
==
comparison:In many cases it's not an issue, because we pass the files around, but in a few it is, see https://github.com/livebook-dev/livebook/discussions/2706#discussioncomment-10030897. We probably need to introduce
File.same?()
.