/*
                Returns a list of filenames (just the filename, not the path) in working directory.  
                Todo: currently this skips over subdirs.   
                This will throw an IOException exception if the working directory is deleted (or possibly if
                a file is removed) while this method is executing.
        */
public List<FileHandler.FileAttributes> listWorkingDirectory() throws IOException, Exception
	{
		FileHandler fileHandler = null; 
		try
		{
			Tool tool = getTool();
			fileHandler = tool.getToolResource().getFileHandler();
			String workingDirectory = tool.getToolResource().getWorkingDirectory(task.getJobHandle());
			List<FileHandler.FileAttributes> list = fileHandler.list(workingDirectory);
			/*
			log.debug("In listWorkingDirectory, directory is " + workingDirectory + " and there are " + 
				list.size() + " files.");
			*/
			return list;
		}
		finally
		{
			if (fileHandler != null)
			{
				fileHandler.close();
			}
		}
	}
public List<FileHandler.FileAttributes> listWorkingDirectory() throws IOException, Exception
{
FileHandler fileHandler = null;
try
{
Tool tool = getTool();
fileHandler = tool.getToolResource().getFileHandler();
String workingDirectory = tool.getToolResource().getWorkingDirectory(task.getJobHandle());
List<FileHandler.FileAttributes> list = fileHandler.list(workingDirectory);
/*
log.debug("In listWorkingDirectory, directory is " + workingDirectory + " and there are " +
list.size() + " files.");
*/
return list;
}
finally
{
if (fileHandler != null)
{
fileHandler.close();
}
}
}
public List<FileHandler.FileAttributes> listWorkingDirectory() throws IOException, Exception
{
FileHandler fileHandler = null;
try
{
Tool tool = getTool();
fileHandler = tool.getToolResource().getFileHandler();
String workingDirectory = tool.getToolResource().getWorkingDirectory(task.getJobHandle());
List<FileHandler.FileAttributes> list = fileHandler.list(workingDirectory);
/*
log.debug("In listWorkingDirectory, directory is " + workingDirectory + " and there are " +
list.size() + " files.");
*/
return list;
}
finally
{
if (fileHandler != null)
{
fileHandler.close();
}
}
}
public List<FileHandler.FileAttributes> listWorkingDirectory() throws IOException, Exception
{
FileHandler fileHandler = null;
try
{
Tool tool = getTool();
fileHandler = tool.getToolResource().getFileHandler();
String workingDirectory = tool.getToolResource().getWorkingDirectory(task.getJobHandle());
List<FileHandler.FileAttributes> list = fileHandler.list(workingDirectory);
/*
log.debug("In listWorkingDirectory, directory is " + workingDirectory + " and there are " +
list.size() + " files.");
*/
return list;
}
finally
{
if (fileHandler != null)
{
fileHandler.close();
}
}
}