dcsimg
How can I write a Java file that accepts a file name and applies permissions to it?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   phani_kumar
Posted On:   Friday, May 7, 2004 02:36 AM

I want to write a Java file that accepts a file name as a parameter. It then should apply the file permissions to the file accepeted as the parameter.How can I do that?

Thanks in advance

Re: How can I write a Java file that accepts a file name and applies permissions to it?

Posted By:   Christopher_Koenigsberg  
Posted On:   Friday, May 7, 2004 07:26 AM

Do you mean, changes the permissions on the file? I think that is OS-dependent so you'll have to do a Runtime.exec on the OS command (e.g. "chmod" for Unix, I forget the DOS/Windows equivalent, also for Windows it depends if it's FAT where there ARE no "permissions", or NTFS, where you have ACL's ...)

About | Sitemap | Contact