Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve docs for os.StatInfo #253

Open
megri opened this issue Mar 1, 2024 · 1 comment
Open

Improve docs for os.StatInfo #253

megri opened this issue Mar 1, 2024 · 1 comment

Comments

@megri
Copy link

megri commented Mar 1, 2024

os-lib/os/src/Model.scala

Lines 237 to 253 in 56c38a2

/**
* The result from doing an system `stat` on a particular path.
*
* Note: ctime is not same as ctime (Change Time) in `stat`,
* it is creation time maybe fall back to mtime if system not supported it.
*
* Created via `stat! filePath`.
*
* If you want more information, use `stat.full`
*/
case class StatInfo(
size: Long,
mtime: FileTime,
ctime: FileTime,
atime: FileTime,
fileType: FileType
) {

In particular the Note in the docstring is confusing. The parameter names could be better but that's an API change so I think clarifying the specific parameters in scaladoc is the way to go.

Also os.stat.full seems to be replaced with os.stat.posix.

@DavidPerezIngeniero
Copy link

You can make a pull request with the doc rewritten

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants