hdfs
hdfs copied to clipboard
Create file with truncate
On calling CreateFile on existing files I get an error, so the CreateFile call should be like the Golang CreateFile:
func Create(name string) (*File, error) {
return OpenFile(name, O_RDWR|O_CREATE|O_TRUNC, 0666)
}
So an existing file will be overwritten
Hi @flashpixx,
I think you're right that that should be the behaviour for Create (if not CreateFile). However, I think that's enough of a behaviour change that it should be put off until a major version bump. I'll leave this issue open for now.