Temp folders revisited

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
majkinetor
Senior Member
Senior Member
Posts: 369
Joined: 2005-11-20, 10:36 UTC
Location: Belgrade, Serbia
Contact:

Temp folders revisited

Post by *majkinetor »

I read TC 7 [req]: Temp Panel/Virtual folders

I am using this term, "virtual folder" in szlori definition:
For me the "virtual folders" (that's how I would call what I wish for) contain only "pointers" to original files. Their "only" purpose is to group different files fro different locations into one "virtual" place. So of course, I want all operations on the content to be taken on the original files.
Further, I consider virtual folder to hold all that I want, be it subfolder, archive data, registry data...
All your endless conversation, like, should delete really delete or just remove is something which can be left for customization of virtual folder and I found it to be of no importance for implementation.

Ghisler said here, that he found it to be a problem to rewrite most of the file handling code. I think that is the problem here! So we should help him not to do so and find some workaround.Of course, I don't agrie with Mr. Ghisler that this feature is not important. I found it very important like most people I know.

This is some general thinking since I don't have insight in TC source code:
FIRST THOUGHT:
I was really not in file system handling in my own programming but I know that while I was examing junctions feature of NTFS I read in MSDN that you could be able to store in file system information about how files are retrieved. The example in MSDN was about database with some files which were on backup CD, and those files were still listed in local file system and were obtained from CD (with eventual "insert cd" message) during access to them. OK, now I think, what if we try to crate file system structure that will represent our Virtual Folder and which will contain files the same name as those in the list and description of how to fetch it in the file system itself, similar to example with backup. This can't be done with hard links as it works only with files. As I already told you, I am not familiar with this procedure, but if anybody knows something it would be nice to put some light on this. Of course, it will work only on NTFS but... FAT will be dath soon. Who use Win9x anyway.

SECOND THOUGHT:
If file handling is dir oriented and not file oriented, like Mr. Ghisler mentioned, consider some rootkit technology for hooking file system calls. For those unfamiliar with rootkit phenomena go to rootkit.com.
Let's say we have special panel for Virtual Folder and we are garbaging things in it. We keep file system clone of Virtual Folders on local hd, but just information about file name so no actual space is taken.
Suppose now we want to access some file. I suppose there is no problem for detecting if request was issued from Virtual Folder. U use regular function you use on normal folders. But now, since you recognized Virutal Folder file operation, U install hook which will intercept operation and deal with each file in the list according to its type.

For instance:

function CopyDir ( inVirtualFolder: Boolean )
begin
if inVirtualFolder then InstallHook;
NormalCopy();

//remove hook somewhere to free resources
end;


Am I making any sense ?
Post Reply