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

Is there an async version of touch? #634

Open
vedantroy opened this issue Aug 1, 2024 · 1 comment
Open

Is there an async version of touch? #634

vedantroy opened this issue Aug 1, 2024 · 1 comment

Comments

@vedantroy
Copy link

Exactly as the question sounds. Is there an async version of touch?

@martindurant
Copy link
Member

To create an empty file, you can do

await fs._pipe_file(path, b"")

I don't think any async backends support the extended use of touch to update the timestamp or truncate to a specific length; but you can probably update metadata separately (also backend-specific).

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