Talk:Truncate a file: Difference between revisions

m
Line 6:
It's pretty clear that this task assumes unix file system semantics. So, can we ignore other operating systems in this task? --[[User:Rdm|Rdm]] 14:33, 19 July 2011 (UTC)
:Why is it clear the task assumes unix behavior? --[[User:Ledrug|Ledrug]] 14:37, 19 July 2011 (UTC)
::Quoting http://www.conifersystems.com/2008/10/21/windows-vs-unix-file-system-semantics/ '''The Windows delete and rename model is different.''' ''You wouldn’t know this from the Win32 APIs, but in order to delete or rename a file in Windows, you first have to open it! Once you’ve opened it can you call NtSetInformationFile with InformationClass of FileDispositionInformation or FileRenameInformation. Setting FileDispositionInformation doesn’t even delete the file; it merely enables delete-on-close for the file, and the delete-on-close request could very well be cancelled later.''
::AsAnd, as near as I can tell, you have to get rid of the association between a name and a file before you can give another file that name. --[[User:Rdm|Rdm]] 14:43, 19 July 2011 (UTC)
6,951

edits