thank you mars, but i decided to organize the code differently, and centralize the job in serveTar() since the case of a folder must be hanlded exactly the same way as it was already done.
every case should be handled, so i created this (attached) VFS to test if my code was working good.
additionally: inside the real folder there's a file "4", and another file "t\5" (under "t").
so the point is that you, by entering folder A, should be able to select all (or any) items and get an archive that will reflect the VFS and your selection.
make this test and see if your code is working correctly.
mine is doing.
and if you get to create an example to show a problem with mine, please let me know.