Tech Support > Computers & Technology > Programming > how to insert tow byte in front of a file
how to insert tow byte in front of a file
Posted by Alf P. Steinbach on June 18th, 2006


* Rolf Magnus:
Depends on the OS. Windows supports hardlinks for files, symlinks for
directories, and shortcuts (which are like symlinks but not
automatically resolved) for anything. The rename approach might be
appropriate when safety against file content destruction is important,
you're guaranteed that no other process will create that file in the
span between its deletion and recreation by your program, and efficiency
is valued more than link preservation.

I think it should be a user-selectable option.

Follow-ups to [comp.programming].

--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?

Posted by Willem on June 18th, 2006


Alf wrote:
) Depends on the OS. Windows supports hardlinks for files, symlinks for
) directories, and shortcuts (which are like symlinks but not
) automatically resolved) for anything. The rename approach might be
) appropriate when safety against file content destruction is important,
) you're guaranteed that no other process will create that file in the
) span between its deletion and recreation by your program, and efficiency
) is valued more than link preservation.

It also protects against losing the whole file when there is a crash
halfway during the write. Hard links are evil anyway. :-)

) I think it should be a user-selectable option.

Users shouldn't be trusted to make such a choice.
No smiley, it reflects my actual opinion of the average user.


SaSW, Willem
--
Disclaimer: I am in no way responsible for any of the statements
made in the above text. For all I know I might be
drugged or something..
No I'm not paranoid. You all think I'm paranoid, don't you !
#EOT


Similar Posts