import java.io.*; import java.lang.*;
public class FileCheck {
public static void main(String[] args) {
if (args.length < 1) {
System.out.println("Please provide the path to the file to process.");
return;
}
String filePath = args[0];
SecurityManager sm = System.getSecurityManager();
if (sm == null) {
System.out.println("Whoops!! Security manager not found.");
}
else {
sm.checkRead(filePath);
sm.checkWrite(filePath);
}
}
}