Code example for File

Methods: mkdir

0
				status = false;
		}else 
			status = false;
		return status;
	} 
	 
	protected boolean deleteFile(String fileName){
		boolean status;
		SecurityManager checker = new SecurityManager();
			 
		if ((testSaveLocationExists())&&(!fileName.equals(""))){
		 
			File path = Environment.getExternalStorageDirectory();
            File newPath = constructFilePaths(path.toString(), fileName);
			checker.checkDelete(newPath.toString());
			if (newPath.isFile()){
				try { 
					Log.i("DirectoryManager deleteFile", fileName);
					newPath.delete();
					status = true;
				}catch (SecurityException se){
					se.printStackTrace();
					status = false;
				} 
			}else 
				status = false;
		}else 
			status = false;
		return status;
	} 
	 
	private File constructFilePaths (String file1, String file2){
		File newPath;
		newPath = new File(file1+"/"+file2);
		return newPath;
	} 
 
}