question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add File Touch API

See original GitHub issue

I’d like some way to ‘touch’ (i.e. set the last write time to the current time) a file using cake.

Basically to do this: System.IO.File.SetLastWriteTimeUtc(fileName, DateTime.UtcNow);

Does that sound like something you would consider accepting a PR for, or should I create this as an addin instead? I figured it’d fit well within Cake.Common.IO, following the same pattern as the other basic file operations.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
matkochcommented, Jul 30, 2017

@Redth Touch usually not only means to update the last modification date, but also creating the file, if it doesn’t exist.

1reaction
Gudahttcommented, Jan 28, 2017

Great! I hadn’t seen that addin before, that’s perfect.

@Redth I’ll write up a PR this evening.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Method: files.touch | Google Drive
Experiment with authorization and field settings. For help, check the APIs Explorer documentation. Request parameters. fileId.
Read more >
touch command in Linux with Examples
The touch command is a standard command used in UNIX/Linux operating system which is used to create, change and modify timestamps of a...
Read more >
How To Use The touch Command in Linux {12 Examples}
The touch command creates files in Linux through the terminal. Learn about the advanced touch options through this hands-on tutorial.
Read more >
How to use touch(1)
The answer of echox is valid but I want to add information regarding file creation time. Some file systems support an additional entry...
Read more >
What Is Linux Touch Command + Practical Usage Examples
The Linux touch command is a standard command used to modify the timestamps of a file. Learn how to use the touch command...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found