A guide to HFS
Document info
Started: 27 Sep 2003
Last edit: 23 Feb 2004
Contacts: rejetto@rejetto.com
Software version referred: 1.6
Please, check also the F.A.Q. page
Software info
Website: www.rejetto.com/hfs ; hfs.sf.net
Author: Massimo Melina
Price: Free of charge (gratis)
License: GNU GPL
project started on Aug, 16 2002
Introduction to this document
This is an attempt to document HFS and its features. The main redactor is Massimo Melina, but anyone
who would like to contribute is welcome. Help in translations and corrections is welcome too.
Introduction to HFS
What's it for?
HFS was designed to share files.
What is it?
It is actually a web server. Your friends will download files as you was a website.
They can use a web browser, as Internet Explorer.
Most web servers are designed to publish a website. HFS is designed to share your files, but you are
free to use it in any other way, always at your risk. Just keep in mind it is not designed to do that.
What HFS stands for?
HTTP File Server
Installation
HFS needs no installation. The only file you need to use this program is the hfs.exe.
Just put it in a folder of your choice and run it.
My advice is to integrate it in the explorer contextual file menu. This can be done from HFS, by clicking on menu -> shell context menu -> add for all. It is a good idea also to click on Associate .vfs that you can find in the same menu.
Uninstallation
Since HFS needs no installation, it needs no uninstall procedure.
Just delete the file hfs.exe.
If you integrated HFS in the windows explorer, just use the menu -> shell context menu -> delete.
That's it!
How to use it
A basic usage is
- to run the program,
- to drag&drop on the window the elements you want to share,
- then to communicate to your mate the address of the item s/he wants to download.
After you drag&drop the files, the address is already copied in your clipboard, therefore if
you use the paste command in a (lets say) chat window, you will get to send the address.
The address is also called URL.
Keep in mind this is one of the many ways to do the work. If you followed my previous
advice you will not need to run the program before, just right-click on the file/folder you
want to share, and select HFS. This way HFS will run and automatically share the item, and
copy the URL in your clipboard, ready to be pasted.
The Virtual File System
Ok, from the beginning...
What is a File
It is a sequence of bytes. A byte is an information unit.
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 usually lie on a disk. A Virtual File System (VFS from now on) does lie in memory instead.
This can be a very interesting thing, in facts this is the main reason I started working on HFS.
Thanks to the VFS you can publish things in the way you want without changing anything on your disk.
People will see what you want them to see. You can hide files, rename them, move'em to another folder...well,
this is what people will see! No changes on your disk.
A lot of people is already experienced in that, because of well-known softwares, like Nero, has a VFS,
where you can project your CD. With HFS you project your...website.
Most web servers let you publish one or more folders, but the content shown will just reflect the disk.
This is often an unwanted feature.
What is a real/virtual folder
The VFS here has both virtual folders and real folders. A real folder is a link to a folder on your disc,
and will show the actual (real-time) content of your disc. Anyway, the real folder is not exactly the folder
on your disc, in facts you can rename it (virtually, that is to publish it with another name) and you can
add items onto it, as files or virtual folders...or another real folder.
Virtual folders are yellow, real folders are red.
A virtual folder will show only items you see in the VFS. When you create one based on a folder of your
disc, HFS will deep scan the files of your disc to add them to the VFS. If in the while a file is added,
or removed, the VFS won't be updated. It would be an heavy task for the computer to keep the VFS up to date,
and this is not the behaviour expected from a virtual folder.
A real folder will read the disc to know what items to show. When you create one, no scan will be
performed; in facts, the scan is performed on client's request.
File Menu
Copy URL
Copies the URL to the clipboard.
Get passworded URL
Copies the URL to the clipboard. The URL so made integrates username and password necessary to access the file.
To specify user/pass via URL is a less secure system, but it is easier to use and more secure than no password
at all.
Set URL
Set the link.
Browse it
Opens your default web browser on the URL of the item.
Run it
Executes the selected item, on the server computer of course.
Comment
Specify a comment for the item. It will appear to the client while browsing.
Icon
Select a different icon for the item.
Switch to virtual
Turn a real folder to a virtual one.
New folder
Adds a virtual folder.
New link
Adds a "link" item. A link has a URL, therefore you can link anything on the net.
Rename
Renames the item from the VFS.
Remove
Removes the item from the VFS.
Paste
If you copy a file from Explorer, you can then paste it in the VFS.
Add files...
Opens a dialog where you can select files to be added.
Add folder...
Opens a dialog where you can select a folder to be added.
Files/Folders filter...
If you set a filter for files/folders, then some items will be hidden. It works actually as the "Hide" command
so please refer to it for more details. The only files that will be shown are the ones that match the filter
mask. For more information on file masks check the specific section.
Set user/pass
You can protect by password an item. This is an on-the-fly protection, if you need something more, use the
account system (users).
Reset user/pass
Removes user/pass protection. Just the one referred by the above option, it does not alter by-account protection.
Access for users
Protects an item by restricting access to specified users. Before using this option you have to configure
some account.
Customized realm
Specify a realm for the item.
Let browse
Dis/allow browsing for the selected folder.
Hide
If you don't want people to know about a file that is in your VFS, you can just hide it. It does not actually
prevent retrieving, in facts you can give a full URL of the file to your friend and he will be able to
download it. It just do not list the file when people is browsing through the VFS. It is not the most secure
way to protect your files from unwanted accesses, though it is often reasonable since in most cases people
do not know the name of the file you are hiding.
Hide tree
As the option above, but it has an effect on subitems too.
Expand/Collapse
Expands/Collapses the tree branch.
Main Menu
You can access the main menu both from the main window and from the tray icon with a right-click.
Other Options
Auto-copy URL on addition
Every time you add a file, the URL is automatically copied in the clipboard.
Always on top
Makes HFS window on top of other windows.
Send HFS identifier
There is a standard way for HTTP servers to be recognized by clients. HFS does it, but you can turn it off.
Persistent connections
Browsers open multiple connections when they download a page with icons.
If you turn off this option, then there will be a connection for every icon they download. This is slow.
For more details read further.
The old protocol (HTTP 1.0) stated that for every file you had to get from a web server, you had to
open a specific (TCP) connection. To open a TCP connection can be slow. Less connections you open,
faster you go. This is why the new protocol (HTTP 1.1) let us retrieve more files with a single connection.
All recent browsers do this way. Usually it does not speed up a single file download, but it can drastically
speed up browsing through folders. You can turn this option off if you need to. When it is OFF, the connection
is broken after each fulfilled request.
Getright browser specific HTML
Getright has an internal browser, to browse through the links of a webpage.
This feature makes Getright getting an optimised HTML, for a better browsing experience.
Edit HTML template
You can customize the appearance of pages HFS furnishes to browsers.
Graph refresh rate
This is the time in which the Bandwidth graph moves forward. Littler is the value, faster it will move.
MIME types
This is for techies. Here you can associate files (by filemasks) to MIME types. You can find somewhere else in this guide a description of what a MIME type is.
Users
A user is often also called account. To be recognized as a specific user, people has to login.
You can define privileges for users (and also limits in future versions).
Use comment as realm
If a realm is not specified, the comment is sent as realm.
You can find somewhere else in this guide a description of what the realm is.
Login realm
Specify a realm for the LOGIN button.
Hints for newcomers
Display some extra hints.
Start/Exit
Here you can find features about the starting and quitting of the program.
Auto-copy URL on start
Copy the root URL in the clipboard as the program starts.
Start minimized
As the program is started, the window is minimized.
Reload on startup VFS file previously open
If you had a VFS file open the last time you quit, then it will be automatically reloaded.
Auto-save VFS on exit
If you have a VFS open, and it is modified, it will be automatically saved on quitting.
Auto-close
Here you can specify when the program should automatically quit
No downloads timeout
Quit when nothing is sent for a while.
Virtual File System
Folders before
Folders are always shown on top of other items.
Use system icons
You should care about this option. It makes specific file icons appears instead of the generic icon.
This can be very nice but can also slow down HFS drastically in at last 3 ways:
- when you add a folder from the disc as virtual one. At that time, HFS will load icons for every file, and
if you got thousands of files this could be a lengthy operation.
- when you have a real folder and someone browse it. At that time HFS will load all icons, as said before.
- when people browse a page, it will have to download every icon and this could take much time and bandwidth.
List files with hidden/system attribute
Believe it or not, your files have attributes. This option determines if files with that attribute are shown.
List protected items only for allowed users
You can hide protected (by password or account) items from being listed to unauthorized browsers.
Reset hits/downloads
Reset the counter for all items.
Limits
Speed limit
Specify the max total bandwidth HFS will use sending files.
Pause streaming
Stops file sending, but does not break connections. In facts it just set the "speed limit" to zero, temporarily.
Max connections
The maximum number of connections allowed.
Max connections for single address
The maximum number of connections allowed from the same IP address.
Connections inactivity timeout
If a connection is inactive for a while, it can be automatically broken.
Bans
You can prevent clients from specified IP addresses.
Shell context menu
The shell context menu is that menu shown when you right-click a file or folder.
Add for files
Add a reference to HFS in the file menu.
Add for folders
Add a reference to HFS in the folder menu.
Add for all
Add it for files and folders.
Associate .vfs
Associates VFS files to HFS, so you can just double-click on them.
Delete
Deletes files association and menu items.
Flash task button
The taskbar is that bar with the famous START button on it.
The task button is the button on the taskbar with HFS written on it.
You can make it flash to alert you about events.
On download
Flash when a file is requested.
On connection
Flash when a connection is established.
Never
Well, don't.
Tray icons
Tray icons are those icons in the bottom-right corner of your screen.
Minimize to tray
When you minimize the program, the taskbutton is hidden and only the tray icon remains.
Show main tray icon
If this option is ON, the main tray icon is always displayed, no matter if the program is not minimized.
The tray icon shows
The main tray icon display a number. You can decide what this number means.
Tray message
When the mouse is over the main tray icon, it displays a message. You can customize it.
Tray icon for each download
You can get multiple tray icons. For every file download an icon will be created, displaying the progress.
No tray icon for file extentions
You disable the option above for certain file types.
IP address
Here you can select the IP address HFS should use forming URLs in the "Address bar".
If you have dynamic IP address, and it changes, HFS will auto-switch to a similar address.
Custom
Sometimes it is useful to type the address yourself. E.g. if you have your own domain or you are NATted.
URL encoding
Encode spaces
You can disable space encoding to avoid those %20. Please notice that your chat will likely not recognize the
full URL.
Encode non-ASCII characters
ASCII characters are alphanumerics and few more. They are usually encoded in the %NN form.
Use UNICODE in HTML
Non-ASCII characters are subject to incompatibilities. UNICODE systems solve this problem with an international
standard for characters. Some systems do not support it, so it is your choice to use it or not.
Load/Save file system
You can store/retrieve the Virtual File System to/from files.
Clear file system
Removes all items and reset attributes for the root node.
Save options
You can decide where and if to save options.
The Log
to be done
File masks
What is it?
A file mask denotes a set of files. It is something like this: *.jpg;*.gif.
This example denotes any jpeg and gif files.
How does it work?
The example above shows a double file mask. It has two atoms separated by the semicolon: *.jpg
and *.gif. Then semicolon is used to merge multiple masks: it is a special character.
There are only 3 special characters in file masks: ; * and ?.
The star (*)
stands for any string of characters. If the mask contains only the star, it would match ANY file.
If you put an A before the star A*, it matches any file starting with an A.
If you put an A after the star *A, it matches any file ending with an A.
Moreover A*B matches any file starting with an A and ending with a B.
In the example above, you find *.jpg : it matches any file ending with .jpg that is jpeg images.
Well, know that jpeg files sometimes ends with .jpeg and rarely with .jpe .
The star matches also the null string: a*.jpg matches files like a1.jpg , adfgg.jpg
but also a.jpg , where the star has been replaced with nothing.
The question point (?)
stands for a single character. Something like A?B matches any 3 chars long filename,
starting with an A and ending with a B. The length is fixed to 3 characters because ? can be replaced by
only one single character. Thus the ? does not match the null string as the * does.
MIME types
What is a MIME type?
A MIME type is an information describing the kind of document that has been retrieved from the web server. Since a web server can furnish many types of documents, the browser needs a way to know what's the document nature.
Is not the file extension enough?
Sometimes file extension is not enough. E.g. In the web enviroment, when a PHP script generates a jpeg image, you get an URL with a .php extension, but the browser will know the content rapresents a jpeg image because it gets this information in the http header as a MIME type.
Realm
to be done
Tips
- Holding SHIFT on start skips configuration loading and server activation.