Skip to content

[FR]: Add variant of testing::TempDir() that returns std::filesystem::path #4806

@jiawen

Description

@jiawen

Does the feature exist in the most recent commit?

It No

Why do we need this feature?

Now that C++17 is the minimum language version, std::filesystem::path is part of the standard library. It would be ergonomic if we added something like testing::TempPath() to complement testing::TempDir(), returning std::filesystem::path instead of std::string. std::filesystem::path provides some a little bit of abstraction and has some ergonomics, e.g., operator / to joining paths.

Describe the proposal.

Included in the "why" above.

Is the feature specific to an operating system, compiler, or build system version?

No.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions