HFS: The Virtual File System

From rejetto wiki
Revision as of 19:16, 16 March 2011 by Rejetto (talk | contribs) (Reverted edits by 98.87.32.14 (Talk); changed back to last version by Rejetto)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

What is a File

It is a sequence of bytes. A byte is a unit of information.

What is a File System

It is an ordered set of files. Often they are hierarchically ordered in folders (also called directories).

What is a Virtual File System

File Systems are stored on a disk. A Virtual File System (VFS) is stored in memory instead. This can be very interesting; in fact this is the main reason I started working on HFS.

Thanks to the VFS you can publish things in the way you want without actually changing anything on your disk. People will only see what you want them to see. You can hide files, rename them, move them to another folder, etc. This is what people will actually see! But nothing changes on your disk.

Many people are already familiar with this because of well-known software such as Nero which also has a VFS.

Most web servers let you publish one or more folders, but the content shown will just reflect the disk's contents. This is sometimes an unwanted feature.

What is a real/virtual folder

The VFS in HFS has both virtual folders and real folders. Sometimes it may be irrelevant, but at other times you'd better pay attention to which you choose.

Virtual folders are yellow, real folders are red.

Real folders

A real folder is a link to a folder on your disk, and shows the current (real-time) content of your disk. Its behavior is very near to what you usually find in FTP server software. But it is has some virtuality, even if not as much as the virtual folder. I mean, the real folder is not necessarily the same as the folder on your disk. There are many aspects of the folder that you can change virtually. You can rename it (but not the files within it), add files, hide files, etc.

Virtual folders

A virtual folder only shows items you can see in the VFS. When you add a virtual folder based on a folder on your disk, the disk's contents are copied to the VFS. From now on, the content is seperated from the disk; it is virtualized. If a file is subsequently added or removed on the disk, the VFS won't be updated to reflect those changes. Its behavior is very near to what you usually find in CD burning software.

That's about handling the VFS from HFS window. If you delete a file from the browser, the file is deleted on disk.

In the future

In the not-so-far future, this difference between folders will disappear. You will be able to do everything with a (normal) folder.

Tricks

  • Sometimes you need to take control over a sub-folder B of a real folders A. Problem is: you can't directly, because A won't expand in the VFS.
    Solution is: simply manually add B (as real folder) under A. Now you should get all the control you need over it.