Skip to content

space() function requires a directory path on Windows #73

@pchapmanvc

Description

@pchapmanvc

I'm not sure whether this is a bug or a documentation issue.

On Windows, the filesystem::space call passes its parameter to GetDiskFreeSpaceEx, which is documented as requiring a directory.

The boost documentation makes no such requirement, and just talks about posix fstatvfs, which will accept a file.

So I think either the documentation needs updating to require a directory path, or the Windows code path needs to detect whether the parameter is a file and if so, strip the file name before calling GetDiskFreeSpaceEx.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions