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

fs: add Deno.utime(...)/Deno.utimeSync(...) #2241

Merged
merged 2 commits into from May 1, 2019

Conversation

kevinkassimo
Copy link
Contributor

@kevinkassimo kevinkassimo commented Apr 29, 2019

Closes #1948.

function utimeSync(
  filename: string,
  atime: number | Date,
  mtime: number | Date
): void;

async function utime(
  filename: string,
  atime: number | Date,
  mtime: number | Date
): Promise<void>

Notice utime (instead of utimes) means that atime and mtime have resolution of 1 second (epoch time format). (Linux manpages)

@kevinkassimo
Copy link
Contributor Author

kevinkassimo commented Apr 29, 2019

Need help with windows deps fix (as I do not have a windows machine to experiment)
nvm, figured out myself how to do this after reading code from rust.gni

Copy link
Member

@ry ry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - i'm kinda surprised this isn't in Rust's standard lib. Nice work as always.

@ry ry merged commit 7237e9d into denoland:master May 1, 2019
@kevinkassimo kevinkassimo deleted the fs/utime branch December 27, 2019 07:53
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

Successfully merging this pull request may close these issues.

Feature Request: Deno.utimes() api
2 participants