03-26-2008 06:41 PM
03-27-2008 11:46 AM
03-27-2008 12:05 PM
03-27-2008 12:34 PM
Sets the file size of file by setting the end-of-file marker to size bytes from the beginning of the file.So setting the file size to a value that's smaller than the original size effectively truncates the file. I'm not sure what you mean by "safe way to truncate a file".
03-27-2008 01:02 PM
03-27-2008 01:08 PM
wpolk wrote:
I worry about it not being a safe way to truncate because it's not stated that truncation is expected behavior. Generally there's a specific truncate command in other languages. If it's not intended behavior it could be changed in future releases and cause problems, or not work the way I expect every time.
03-27-2008 01:17 PM
03-27-2008 01:28 PM
You're probably right. Thanks for setting my worries to rest!
@smercurio_fc wrote:
I think you may be worrying about something that doesn't need worrying over.