Skip to content

[ra_ap_vfs] Provide fallible API to fetch file path from file ID #19280

Closed
@snprajwal

Description

@snprajwal

Currently, the API to retrieve a file path from the VFS with a file ID (https://docs.rs/ra_ap_vfs/latest/ra_ap_vfs/struct.Vfs.html#method.file_path) panics if the file does not exist in the VFS. An exists() boolean method allows a preliminary check, but it would be great to have a fallible API that returns an Option<&VfsPath> and saves the user from having to do an existential check every time. Maybe it can be named file_path_if_exists()? I'm open to ideas, and am happy to contribute this addition!

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-featureCategory: feature request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions