Code example for StatFs

Methods: getAvailableBlocks, getBlockSize

0
	} 
	 
	protected boolean deleteDirectory(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.isDirectory()){
				String[] listfile = newPath.list();
				// delete all files within the specified directory and then delete the directory 
				try{ 
					for (int i=0; i < listfile.length; i++){
						File deletedFile = new File (newPath.toString()+"/"+listfile[i].toString());
						deletedFile.delete();
					} 
					newPath.delete();
					Log.i("DirectoryManager deleteDirectory", fileName);