Login
Register
Menu
Home
Help
Search
rejetto forum
PROBLEMS? QUESTIONS? CLICK HERE!
rejetto forum
»
Software
»
HFS ~ HTTP File Server
»
Programmers corner
»
Configure HFS Virtual File System by code
Configure HFS Virtual File System by code
vespina
·
4 ·
7143
« previous
next »
Print
Pages:
1
0 Members and 1 Guest are viewing this topic.
vespina
Occasional poster
Posts:
2
Configure HFS Virtual File System by code
on:
January 16, 2024, 06:41:14 PM
I am thinking on including HFS with my software to allow users to download some app-related content without messing with IIS. My normal installation contains an "Intranet" folder with an index.html and a Files folder inside of it. The idea is to somehow configure HFS (via INI file) so when user starts HFS it automaticallly load the VFS according to the install location.
I tried replacing paths in a saved VFS files but it seems the file contains some CRC checksum to avoid anyone to mess with it.
Is there any way that I can manually create a VFS file with the correct paths ?
TIA
LeoNeeson
Tireless poster
Posts:
859
Status: On hiatus (sporadically here)
Re: Configure HFS Virtual File System by code
Reply #1 on:
January 17, 2024, 04:25:05 PM
You could do it by
scripting
(
THIS
thread could give you some light).
Keep in mind that Rejetto stopped developing HFS v2.x
(he is busy developing his new
HFS v3
). The most easy solution, is using an already modified HFS version.
The only active fork of HFS is maintained by
Rapid
, which already
changed
the VFS to ZIP format (with JSON and images, as separate files). I haven't tested it, but you can download it from
HERE
.
In case you know about programming (Delphi language), another option is modifying the source code and
recompiling
the binaries (the executable). If I were to modify the sources, I would analyze the possibility of saving the VFS encoded in Base64 (but that's only useful if, before, we convert data blobs from binary to ASCII format), otherwise it makes no sense in just saving the VFS using Base64 encoding. I have no time to think about the changes needed, but if you do it, you could leave the modifications here (to make this useful to anyone).
Hope it helps.
Leo.-
•
HFS in Spanish (HFS en Español)
/
How to compile HFS (Tutorial)
» Currently taking a break, until HFS v2.4 get his stable version.
vespina
Occasional poster
Posts:
2
Re: Configure HFS Virtual File System by code
Reply #2 on:
January 17, 2024, 06:01:45 PM
Thanks for your answer. Scripting could be the way to go if there were a way to run a script from command line, which is not supported AFAK. I think I would have to look for another solution. Its a shame, because this software is awesome.
rejetto
Administrator
Tireless poster
Posts:
13523
Re: Configure HFS Virtual File System by code
Reply #3 on:
February 01, 2024, 11:20:27 PM
hey, sorry for the late answer.
You could experiment with the [server start] event, where you can put your script
https://rejetto.com/wiki/index.php?title=HFS:_Event_scripts
The vfs format is not very complex but neither very easy. THere's no documentation, you should study the sources.
With HFS 3 i decided for simple text format (yaml).
Print
Pages:
1
rejetto forum
»
Software
»
HFS ~ HTTP File Server
»
Programmers corner
»
Configure HFS Virtual File System by code
Search
Username
Password
Always stay logged in
Forgot your password?