package FileHandling;
import java.io.File;
public class FilePermission {
public static void main(String[] args) {
File f=new File("abhi.txt");
if(f.exists())
{
boolean b=f.setReadable(true);
System.out.println("The owner's read permission: "+b);
}
else
{
System.out.println("File Doesn't exists");
}
}
}
import java.io.File;
public class FilePermission {
public static void main(String[] args) {
File f=new File("abhi.txt");
if(f.exists())
{
boolean b=f.setReadable(true);
System.out.println("The owner's read permission: "+b);
}
else
{
System.out.println("File Doesn't exists");
}
}
}
0 comments:
Post a Comment