Package manifold.api.fs.url
Class URLFileImpl
- java.lang.Object
-
- manifold.api.fs.url.URLFileImpl
-
-
Field Summary
-
Fields inherited from interface manifold.api.fs.IFile
EMPTY_ARRAY
-
-
Constructor Summary
Constructors Constructor Description URLFileImpl(IFileSystem fs, URL url)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancreate()booleandelete()booleanexists()Indicates whether this resource exists.StringgetBaseName()StringgetExtension()IFileSystemgetFileSystem()The file system supporting this resourceStringgetName()Gets this file's or directory's name.IDirectorygetParent()Gets this file's our directory's parent directory.ResourcePathgetPath()booleanisChildOf(IDirectory dir)Indicates whether this resource is a direct child of the given directory.booleanisDescendantOf(IDirectory dir)Indicates whether this resource is a descendant of the given directory.booleanisInJar()booleanisJavaFile()InputStreamopenInputStream()OutputStreamopenOutputStream()OutputStreamopenOutputStreamForAppend()FiletoJavaFile()URItoURI()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface manifold.api.fs.IFile
getPhysicalFile
-
-
-
-
Constructor Detail
-
URLFileImpl
public URLFileImpl(IFileSystem fs, URL url)
-
-
Method Detail
-
getFileSystem
public IFileSystem getFileSystem()
Description copied from interface:IResourceThe file system supporting this resource- Specified by:
getFileSystemin interfaceIResource
-
openInputStream
public InputStream openInputStream() throws IOException
- Specified by:
openInputStreamin interfaceIFile- Throws:
IOException
-
openOutputStream
public OutputStream openOutputStream() throws IOException
- Specified by:
openOutputStreamin interfaceIFile- Throws:
IOException
-
openOutputStreamForAppend
public OutputStream openOutputStreamForAppend() throws IOException
- Specified by:
openOutputStreamForAppendin interfaceIFile- Throws:
IOException
-
getExtension
public String getExtension()
- Specified by:
getExtensionin interfaceIFile
-
getBaseName
public String getBaseName()
- Specified by:
getBaseNamein interfaceIFile
-
getParent
public IDirectory getParent()
Description copied from interface:IResourceGets this file's our directory's parent directory.
-
getName
public String getName()
Description copied from interface:IResourceGets this file's or directory's name.
-
exists
public boolean exists()
Description copied from interface:IResourceIndicates whether this resource exists.
-
delete
public boolean delete() throws IOException- Specified by:
deletein interfaceIResource- Throws:
IOException
-
getPath
public ResourcePath getPath()
-
isChildOf
public boolean isChildOf(IDirectory dir)
Description copied from interface:IResourceIndicates whether this resource is a direct child of the given directory.
-
isDescendantOf
public boolean isDescendantOf(IDirectory dir)
Description copied from interface:IResourceIndicates whether this resource is a descendant of the given directory.- Specified by:
isDescendantOfin interfaceIResource- Parameters:
dir- the directory which would be the ancestor- Returns:
- true if this is a descendant of the given directory
-
toJavaFile
public File toJavaFile()
- Specified by:
toJavaFilein interfaceIResource
-
isJavaFile
public boolean isJavaFile()
- Specified by:
isJavaFilein interfaceIResource
-
-