J
John Wu
Hi
I am having a weird problem. I have the following code.
require "fileutils"
FileUtils.cp '/path/to/file.txt', '/path/to/archive/file-date.txt'
File.open('/path/to/file.txt', 'w')
What I want to do is copy file.txt content to file-date.txt in a sub
directory, then reset file.txt to empty.
But after I run the code above, both file.txt and file-date.txt are
reset to empty file. What am I missing here?
Thanks a lot!
I am having a weird problem. I have the following code.
require "fileutils"
FileUtils.cp '/path/to/file.txt', '/path/to/archive/file-date.txt'
File.open('/path/to/file.txt', 'w')
What I want to do is copy file.txt content to file-date.txt in a sub
directory, then reset file.txt to empty.
But after I run the code above, both file.txt and file-date.txt are
reset to empty file. What am I missing here?
Thanks a lot!