import java.io.*;

public class FileInfo {

    public static void main(String[] args) {
	for (int i = 0; i < args.length; i++) {
	    String path = args[i];
	    if (args.length > 1)
		System.out.println("Regarding \"" + path + "\":");

	    File file = new File(path);
	    if (file.exists()) {
		System.out.println("This file exists.");
		System.out.println("It can" + (file.canRead() ? "" : "not") +
		                   " be read.");
		System.out.println("It can" + (file.canWrite() ? "" : "not") +
		                   " be written.");
		System.out.println("It is " + file.length() + " bytes long.");
		if (file.isFile()) {
		    System.out.println("It is a normal file.");
		} else {
		    System.out.println("It is a directory.");
		    String[] contents = file.list();
		    if (contents.length == 0)
			System.out.println("It is empty.");
		    else {
			System.out.println("It contains the following files:");
			for (int j = 0; j < contents.length; j++)
			    System.out.println("\t" + contents[j]);
		    }
		}
	    } else {
		System.out.println("This file does not exist.");
	    }
	    System.out.println();
	}
    }
}
