Applet File Detection
Say I use this code an an Applet
publicboolean fileExists(file){
File f =new File(file);
return f.exists();
}
Does that check for the file on the client computer or the server computer?
Say I use this code an an Applet
publicboolean fileExists(file){
File f =new File(file);
return f.exists();
}
Does that check for the file on the client computer or the server computer?
> Client.
>
> You are aware of the security restrictions on an
> applet regarding files?
Actually I'm not. But it would be pretty dumb not to have them considering if there were none, an applet could delete all files on your hard drive.
I don't want to delete, write or append any files. I just need to check to see if it exists. Are there restrictions on this?
Thanks
> > Client.
> >
> > You are aware of the security restrictions on an
> > applet regarding files?
>
> Actually I'm not. But it would be pretty dumb not to
> have them considering if there were none, an applet
> could delete all files on your hard drive.
>
> I don't want to delete, write or append any files. I
> just need to check to see if it exists. Are there
> restrictions on this?
>
> Thanks
Yes, there are restrictions on this. You will need to sign your applet in order to access the file system (whether for reading or writing).