FileDocCategorySizeDatePackage
FileSource.javaAPI DocGlassfish v2 API3654Fri May 04 22:32:14 BST 2007com.sun.enterprise.util.io

FileSource

public class FileSource extends Object
author
bnevins
version

Fields Summary
private File
fileSource
private boolean
isDir
Constructors Summary
public FileSource(File f)

		if(f == null)
			throw new IllegalArgumentException("null File argument.");
		else if(!f.exists())
			throw new IllegalArgumentException("File doesn't exist: " + FileUtils.safeGetCanonicalPath(f));
		
		if(f.isDirectory())
			isDir = true;
		else
			isDir = false;
		
		fileSource = f;
	
Methods Summary
public booleanexists()

		return fileSource != null && fileSource.exists();
	
public java.io.FilegetFile()

		return fileSource;
	
public java.io.FilegetSource()

		return fileSource;
	
public booleanisArchive()

		return !isDir;
	
public booleanisDir()

		return isDirectory();
	
public booleanisDirectory()

		return isDir;
	
public java.lang.StringtoString()

		if(fileSource == null)
			return "null FileSource";
	
		return FileUtils.safeGetCanonicalPath(fileSource);