is it any way to hide folders/ files with python.
Im working a huge project (a vulnerability scanner) the project creates alot of files and folders, so back to the question, is it any way to make a script that hides files and folders.
is it any way to hide folders/ files with python.
Im working a huge project (a vulnerability scanner) the project creates alot of files and folders, so back to the question, is it any way to make a script that hides files and folders.
If you can put your data in a DBM style file you will only have a single data file.
http://docs.python.org/library/anydbm.html
Instead of filenames you would use keys into the db and the content of your file would be found by indexing into the db.
This requires that your individual files are small enough to be easily fully loaded each time you need access to part of them. If they are big then consider splitting them and using the DBM keys to access chunks of it. For example if "example.txt" contains many lines and you want to be able to access each line individually you could store it as db["example.txt/l1"]
…db["example.txt/l42"]
.
If this is for Windows:
http://code.activestate.com/recipes/303343/
Summary: import win32api, win32con, os win32api.SetFileAttributes(filename,win32con.FILE_ATTRIBUTE_HIDDEN)
If for Unix:
filename = "." + filename