I have a project to do for my master's degree and I need to do a Java app which loads a file (read some attributes and copy the file to a working directory), basically any file, and make the working directory private. By private I mean to hide that directory in a way from any OS (well, basically Windows and Linux). I'm not sure that the OS (Windows and Linux) functions to hide directories work because an admin/superuser can modify those settings and easily access my files.
The idea for the project is to have exclusive access to those loaded files from within the app and to make them available for the applications installed locally to open/run them (like "Open in media player"), which should work also when I copy the app to a USB stick.
I have 2 options:
1. modify each file after loading to make unreadable to the world and undo the modifications each time I press "Open" from within the app;
2. (which I think is the best and most simple option) Modify the root directory of those files (root = the working directory or some subdirectory of it) to be unreadable/unaccessible to the world while outside the app and readable to the app at runtime.
I've been thinking about something like making a locally encrypted copy of filesystem attributes of the directory, "delete" them while not at app runtime and put them back while at app runtime. But I haven't really played with this before and also Windows & Linux filesystem aren't simple at all. More of it, a USB stick has a FAT filesystem (which if I'm not wrong "belongs" to DOS), which is, yeah, another filesystem into the equation.
I'm almost sure it is not feasible (and not secure!) to simply play back and forth with the filesystem at my pleasure, so I need some ideas to find that breakthrough without actually breaking anything.