Tuesday, July 19, 2005

Windows File System Tunneling

Windows NT Contains File System Tunneling Capabilities:

When a name is removed from a directory (rename or delete), its short/long name pair and creation time are saved in a cache, keyed by the name that was removed. When a name is added to a directory (rename or create), the cache is searched to see if there is information to restore. The cache is effective per instance of a directory. If a directory is deleted, the cache for it is removed.

These paired operations can cause tunneling on "name".
- delete(name)/create(name)
- delete(name)/rename(source, name)
- rename(name, newname)/create(name)
- rename(name, newname)/rename(source, name)

The idea is to mimic the behavior MS-DOS programs expect when they use the safe save method. They copy the modified data to a temporary file, delete the original and rename the temporary to the original. This should seem to be the original file when complete. Windows performs tunneling on both FAT and NTFS file systems to ensure long/short file names are retained when 16-bit applications perform this safe save operation.
...
Tunneling cache time can be adjusted from the default time of 15 seconds, or if tunneling capabilities are undesirable, it can be disabled by adding a value in the Windows Registry.

A fenti cikk innen van:
Raymond Chen: The apocryphal history of file system tunnelling

O ezt irja meg:

As another example of the importance of tunneling, consider that file "File with long name.txt", whose short name is say "FILEWI~1.TXT". You load this file into a program that is not long-filename-aware and save it. It deletes the old "FILEWI~1.TXT" and creates a new one with the same name. Without tunnelling, the associated long name of the file would be lost. Instead of a friendly long name, the file name got corrupted into this thing with squiggly marks. Not good.

Illetve leirja, hogy a tunneling kifejezes a quantum mechanikabol lett atveve.