rejetto forum

Why Virtual folder deletes files from hard disk

Guest · 6 · 2796

0 Members and 1 Guest are viewing this topic.

Petromir Dzhunev

  • Guest
Hi all,

I read this on wiki:

Quote
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, the VFS won't be updated to reflect those changes. Its behavior is very near to what you usually find in CD burning software.

So I made one virtual folder in my HFS, and when I access it from the browser, and delete some files from it, these files are deleted from the hard disk!

I don't understand why?
Can you tell me where my mistake is?

Thanks in advance!


Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 2059
    • View Profile
because you have added the folder as a real folder into the vfs

choose a real folder with some files ans subfolders from your hard drive, add the folder into the vfs as a VIRTUAL folder on root(home), by doing that, all files and subfolders are added into the vfs as virtual items.

What explain the wiki is:

when by example you add a real folder 'XXX' (red icon) in the vfs, and create a new virtual subfolder 'YYY' (yellow icon) under 'XXX'.

open the folder 'XXX' from your hard drive, and create a folder named 'YYY', change curent dir to 'YYY' and add some files.

open your browser and go to the url localhost/XXX/YYY

the file list is empty but on your hard drive path ...\XXX\YYY is not empty. WHY?

It's because there is no link between a virtual folder and a real folder
.
In the vfs, the virtual elements are priority face to face real elements which are only visible by inheritance

then if you add items in the vfs inside 'YYY', they are visible by the browser, but files or folders in 'YYY' on the hard drive are masqued until you remove the virtual folder 'YYY' from your VFS.


By making shorter, any element, which is added to the vfs and possesses the same URL as a file on the hard disk, has the priority of display on this last one in the browser.

« Last Edit: January 05, 2011, 08:42:15 PM by Mars »


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
@mars, he said he made VIRTUAL folder.

@Petromir
that description is about what you do in the HFS program, not from the browser.
i know it may not be very clear, feel free to improve it if you want.
You deleted the file from the browser, i guess.
On the HFS window, when you remove a file or folder, you are only removing a sort of "link", no file or folder on the disk is harmed.
I hope it's clearer now.


Petromir Dzhunev

  • Guest
Thank you guys.

@rejetto, You have developed great program.Thanks again.

About the virtual file system, may be it will be good to add one more sentence, e.g. "Note that if you delete the files from the browser, they will be deleted from the hard disk to!"

Good luck with the code ;)


Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 2059
    • View Profile
as say rejetto , when you delete something on the vfs, nothing is deleted on the hard disk

but if you use a web interface to delete, all files deleted are going to your recycled bin if they are not virtual.

Quote
Note that if you delete the files from the browser, they will be deleted from the hard disk to!"

It belongs to you to manage authorizations, no warning is necessary.

 hfs can serve to feign a ftp Web server  but in http mode only


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
i think he meant to put that sentence on the wiki, not the program. Done.