Here you can find the source of getFileStatus(File file)
public static String getFileStatus(File file)
//package com.java2s; //License from project: Apache License import java.io.File; public class Main { public static final String FILE_STATUS_HIDDEN = "H"; public static final String FILE_STATUS_CAN_READ = "R"; public static final String FILE_STATUS_CAN_WRITE = "W"; public static String getFileStatus(File file) { StringBuffer buffer = new StringBuffer(); buffer.append(file.isHidden() ? FILE_STATUS_HIDDEN + "\t" : "\t"); buffer.append(file.canRead() ? FILE_STATUS_CAN_READ + "\t" : "\t"); buffer.append(file.canWrite() ? FILE_STATUS_CAN_WRITE + "\t" : "\t"); return buffer.toString(); }//from w w w . ja va 2 s . c o m }