Skip to content

Provide a way of getting a file's real pathΒ #35370

Open
@nex3

Description

@nex3

Right now, given a user-provided file path, there's no (efficient) way of getting that file's real path on disk. On Linux et al these are always the same thing (modulo . and .. path components which p.normalize() can handle), but Windows and some OS X systems have case-insensitive filesystems where a file named FILE.TXT can be referred to by the path file.txt. Worse yet, some servers appear to only serve the files in question if the case matches exactly, even when the underlying filesystem is case sensitive (see sass/dart-sass#540).

It's possible to work around this today using Directory.list() on the parent directory, but that's much more expensive than a single call. I believe you can use FindFirstFileA for this on Windows and fcntl with F_GETPATH on Unixes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.customer-dart-sasslibrary-iotype-enhancementA request for a change that isn't a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions