Jump to content

Vfsutil


Alchemist

Recommended Posts

I made command line wraper for VFStooll. This thing extends vfstool functionality with some features found in regular archivers. And what is more important, through VFSutil one can use VFStool just like those archivers with FAR Manager's MultiArc plugin. Browsing VFS volume as directory in the file panel, adding single file or directory at the specfied path inside of the VFS, unlike usual VFStool "in" command behavior. Wraper is written in LUA, so LUA interpreter is requierd and some files from the Win32 or DJGPP port of GNU fileutils either.

Installation is manual and requiers some knowledge of MultiArc configuration. It mean that this tool is not for casuals at all. But modders would find VFSutil useful.

I'll upload it somwhere in a day or two.

 

Is anybody interested? :power:

Link to comment
Share on other sites

For gamedata.vfs and LocalisationPack.vfs I just have the complete contents extracted in a directory tree. It uses a fair bit of disk-space (2.7GB) but I've got that to spare and its the most convenient way for me to access the original files. I rarely access other VFS files, when I do it's usually alpinecfg.vfs so a batch file extracts that with a double-click.

 

Fulby

Link to comment
Share on other sites

2sigget:

Of course I'm interested. :)mailto:alchemist@fromru.com

As I said before wraper was needed to make three utilities I already had work together. Output of vfstool "l" command (archive listing) can not be directly read by FAR. So first function of wraper is to reformat vfstool output into FAR friendly listing. Also vfstool only accepts directories as argument to it's "in" command, but FAR could pass either file list, which is unsupported by vfstool, or pathname by pathname. And the top most directory name of the argument will be lost because it is used like container only. FAR doesn't expect such behavior either. So wraper has to temporary make all of neccessary directory structures, copy requested files there, call vfstool and then proceed with the cleanup. Similar things take place when "se" command had to be used with a directory.

 

2Fulby:

Developer's way :power: Most of the files you will not use for weeks but they still will occupy disk space.

 

Well, if you both have not used FAR for years, it's hard to explain why wraper needs to behave this way.

Link to comment
Share on other sites

Developer's way  Most of the files you will not use for weeks but they still will occupy disk space.

:power: I have an Archive directory that's been on every PC I've owned and transferred to each new one, it's now up to 23GB. It's mostly demos and mods for games I never play any more, but you never know when you want to dust of some ancient game and still have the save games for it :) A lot of the stuff I don't even recognise, but don't want to run it in case it automatically installs itself :D

 

Fulby

Link to comment
Share on other sites

Hi again Alchemist, ive looked at the files you sent me and its really interesting. But im not sure ive got it all figured out, this is used by the MultiArc that handles archives for Windows Commander right? I havent tried it yet so i dont know what it can do. Are there any modifications or additions that you would like implemented to enhance it. A browsable utility for vfs files thats easy would be great. I started working on one and ran into some real problems when i wanted to handle drag-n-drop from and to explorer, and dragdropping inside the app from the filelist to the tree. Well its a dead project and your idea of integrating vfs functionality as a plugin into an existing filebrowser is very interesting!
Link to comment
Share on other sites

Hi Sigget.

I've heard before, that recent versions of Windows Commander (which is known as Total Commander now, because of Microsoft) can actualy use native FAR Manager's plugins but never tried to test it myself. I work with FAR for five years and found it's text mode interface most satisfactory. But I don't care much about drag-n-drop. :)

 

Don't try get code I send to work. It will not run as expected without cp.exe, rm.exe,

mkdirdj.exe and proper installation. Get functional package here: VFSutil-0.6.1.zip

 

Now about new features I've added already.

First of all, "list" command output can not be readen by MiltiArc directly. To satisfy it's standarts I had to replace 0x0B symbol, which delimits file size string, with '\n' sequence. Also added another one dup(79) '-' string before files/dirs totals as an end of list marker.

 

Second. "Add" command usually acts almost the same way as "in", but it adds directory itself into VFS, not just whole contens of one. Also "add" can insert not only directories but individual files to. And the last feature of this command is that you can specify path inside of the VFS where you wish to insert file or directory. All of this is not such complicated as looks. In result you just select source(s) in the one panel of the the browser and destination in the other. Then you just need to perform standart copy operation. :D

Command "move" is the same as "add" but it also removes source file or directory. It's a dangerous command. :) But I need it sometimes.

 

Third. "x" stands for alternative "se" command. Basicaly it is "se" but as before directory itself is beeing extracted, not it's contens only.

 

Fourth. "t" command is just sequencial call of "i" and "c". Not much here. General public, it seems, will not find this command interesting.

 

Almost all of above involves silent copiing of the source files to the temporary directory tree, created by VFSutil, before appling VFStool command. So it inpacts perfomance greatly on large amounts of data. And plenty amount of a free disk space is needed to.

 

What I have not done.

Extracting without path names i.e. all files are extracted into one directory and no subdirectories are created. Sometimes it becomes very useful.

 

File list processing. In our case VFStool (and VFSutil) can add or extract only one item (file or directory) per call. So MultiArc has to separate one operation into a sequence of calls. It is not very noticable when you add or exract few itmes but prdouces slowdowns in case of several dozens of individual items. I mean when you need to process some part of the directory contens but not all of it. I think it would be nice if VFStool could take list of the arguments instead of only one. Usualy archivers expext list file name after '@' symbol in the commandline. For axample, RAR could be called this way: rar a archive.rar file.dat, or that way: rar a archive.rar @list.txt. In the last case list.txt should contain full path to the file.dat

 

 

That's all for now. :power:

Link to comment
Share on other sites

Okay, i took a look at total commanders plugin interface and found that it shouldnt be too hard to write a plugin for it. This would remove the unnecessary slowdowns and waste of disk space. Of course, its a bit off from the FAR manager you're talking about, but i found it a bit limited, being text mode and all. Instead i think a total commander plugin could do the trick! Are you up for the challange or shall i?

 

Ive looked a bit at writing a windows explorer extension but that was just too much work.

Link to comment
Share on other sites

Well, may be I am just a console addict... :power:

 

If we shall use MultiArc, there is no need to write separate plugin for VFS support. But VFStool code should be altered to provide at least "l", "a" and "x" commands I've described. It's easier and gives more flexibility. Also following this way it's possible to support both FAR and TC.

Link to comment
Share on other sites

Alright. Then I'll add couple of features into VFSutil and this will be an option for FAR users or bath execution. Well, if I'll have enough time it would be better to implement all of these like an alternate console utility using VFSlib.

Hmm... VFS.addon for Total Commander's MultiArc would be nice too.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...