Skip to content

File creation time stx_btime #12416

Open
Open
@phil294

Description

@phil294

Feature Request

Currently on Linux, only st_atim, st_mtim, st_ctim from stat(2) are bound, but since 2018 there's also stx_btim from statx(2) for creation time. It would be neat to be able to access that without writing custom LibC bindings. Creation time is also often available on other systems afaik.

Besides, only mtim is directly available via File's modification_time, there is e.g. no access_time. I assume that was intentional, but if necessary, one can get to those properties also with Crystal::System::File.stat like Crystal internally does.

Admittedly querying creation time is an uncommon use case... but I needed it so I thought it's worth opening an issue anyway

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