Can Hidden files or folders be created?

S

stacey

Hello everyone!

I was wondering if we can create hidden files or folders.
Because i want to store some files so i can re-read them afterwards
when i want, and i don't want the user to see them.

If i use temporary files( which i saw in the documentation that they
are stored in C:/WINNT/TEMP),
will i be able to read them? How long do they stay there? If the
application i am developing is run by mere users(who usually don't
have access to directory C://WINNT), what will happen?

Thank you in advance,

Regards,

Stacey
 
M

Mark Rafn

stacey said:
I was wondering if we can create hidden files or folders.

The concept of a "hidden" file is platform-specific. Most OSs don't have such
a thing (on Unix, files starting with '.' are often ignored, but that's a tool
convention, not an OS feature).
Because i want to store some files so i can re-read them afterwards
when i want, and i don't want the user to see them.

Windows has such a concept, but it's not used much anymore - it provides no
actual security and just makes things confusing. Modern apps tend to use
directory structures to distinguish things the user may want to mess with from
things they probably don't.
If i use temporary files( which i saw in the documentation that they
are stored in C:/WINNT/TEMP), will i be able to read them? How long do
they stay there?

Ah, windows. Whatever documentation you saw is wrong. It's not always
C:/WINNT/TEMP - that doesn't even always exist. The javadoc for
java.io.File#createTempFile correctly states that it will be in the
"default temporary file directory".

Temporary files are just that. Don't expect them to be there next time you
run the program, or even after you close them.
If the application i am developing is run by mere users(who usually don't
have access to directory C://WINNT), what will happen?

Their "default temporary file directory" will be somewhere they can write to.
 
M

Martin Gregorie

stacey said:
If i use temporary files( which i saw in the documentation that they
are stored in C:/WINNT/TEMP),
>
That's merely the default temp location if the TEMP environment variable
isn't set. If it is set, the temp location is wherever the TEMP variable
says it is.
will i be able to read them? How long do they stay there? If the
application i am developing is run by mere users(who usually don't
have access to directory C://WINNT), what will happen?
I think in 'doze they stay there until some program deletes them. Put it
this way: a lot of cruft collects in the temp location that you should
periodically delete.

Unlike the *NIXes I don't think any 'doze version has a function to
periodically empty the temp location.
 
S

stacey

Thank you very much for your reply, and your info.

So, i cant do anything.. I will just have to put them somewhere 'out
of sight'.

Best Regards,

Stacey
 
G

Gordon Beaton

So, i cant do anything.. I will just have to put them somewhere 'out
of sight'.

Why do you want to hide things from the users of your software?

Remember that they own the computers, you don't. Your software just
gets to borrow some disk space and (if you're lucky) CPU time from
them.

/gordon
 
P

Patricia Shanahan

stacey said:
Thank you very much for your reply, and your info.

So, i cant do anything.. I will just have to put them somewhere 'out
of sight'.

Best Regards,

Stacey

Why not put the files somewhere really visible, with a README file
explaining what application they belong to and the consequences of
changing or deleting them?

Patricia
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top