Date: Sat, 24 Aug 2019 07:06:00 +0000
Niall Douglas:
> Sure. Using LLFIO:
>
> bool path_equality(path_view a, path_view b)
> {
> expected<file_handle, file_io_error> a = catch(file({}, a, :mode::none));
> expected<file_handle, file_io_error> b = catch(file({}, b, :mode::none));
> return a.has_value() && b.has_value() && a->unique_id() == b->unique_id();
> }
>
> This is the only feasible, and correct, way of performing filesystem
> path equality comparison. This is what we ought to do.
>
> Niall
Are you opening files and comparing something conceptually similar to
inodes or global OS thing?
> Sure. Using LLFIO:
>
> bool path_equality(path_view a, path_view b)
> {
> expected<file_handle, file_io_error> a = catch(file({}, a, :mode::none));
> expected<file_handle, file_io_error> b = catch(file({}, b, :mode::none));
> return a.has_value() && b.has_value() && a->unique_id() == b->unique_id();
> }
>
> This is the only feasible, and correct, way of performing filesystem
> path equality comparison. This is what we ought to do.
>
> Niall
Are you opening files and comparing something conceptually similar to
inodes or global OS thing?
Received on 2019-08-24 09:06:31