<h2>org.das2.util.filesystem.FileObject</h2><p><p>Class for describing and accessing files in file systems.  This 
 is similar to java.io.File, except that it can describe files on remote
 file systems like an ftp site.</p>

 <p>Note: this is modelled after the NetBeans fileSystem FileObject, with the
 thought that we might use it later. </p></p>
<h2>FileObject( )</h2>
<p></p>

<hr>
<a name="canRead"></a>
<h2>canRead</h2>
canRead(  ) &rarr; boolean

<p>returns true if the file can be read by the client.</p>

<h3>Returns:</h3>
true if the file can be read (see getInputStream)
<br><br>
<a href="https://github.com/autoplot/dev/search?q=canRead&unscoped_q=canRead">[search for examples]</a>
 <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/das2/util/filesystem/FileObject.md">[view on GitHub]</a>
 <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/das2/util/filesystem/FileObject.html#canRead">[view on old javadoc]</a>
 <a href="https://saturn.physics.uiowa.edu/svn/das2/dasCore/community/autoplot2011/trunk/dasCoreUtil/src/org/das2/util/filesystem/FileObject.java">[view source]</a>
<br>
<br>
<hr>
<a name="exists"></a>
<h2>exists</h2>
exists(  ) &rarr; boolean

<p>returns true if the file exists.  This may have the side effect of 
 downloading the file.</p>

<h3>Returns:</h3>
true if the file exists
<br><br>
<a href="https://github.com/autoplot/dev/search?q=exists&unscoped_q=exists">[search for examples]</a>
 <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/das2/util/filesystem/FileObject.md">[view on GitHub]</a>
 <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/das2/util/filesystem/FileObject.html#exists">[view on old javadoc]</a>
 <a href="https://saturn.physics.uiowa.edu/svn/das2/dasCore/community/autoplot2011/trunk/dasCoreUtil/src/org/das2/util/filesystem/FileObject.java">[view source]</a>
<br>
<br>
<hr>
<a name="getCapability"></a>
<h2>getCapability</h2>
getCapability( <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html'>java.lang.Class</a> clazz ) &rarr; <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html'>Object</a>

<p>returns extra capabilities, such as writing to the filesystem.</p>

<h3>Parameters</h3>
clazz - a java.lang.Class

<h3>Returns:</h3>
an Object

<br><br>
<a href="https://github.com/autoplot/dev/search?q=getCapability&unscoped_q=getCapability">[search for examples]</a>
 <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/das2/util/filesystem/FileObject.md">[view on GitHub]</a>
 <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/das2/util/filesystem/FileObject.html#getCapability">[view on old javadoc]</a>
 <a href="https://saturn.physics.uiowa.edu/svn/das2/dasCore/community/autoplot2011/trunk/dasCoreUtil/src/org/das2/util/filesystem/FileObject.java">[view source]</a>
<br>
<br>
<hr>
<a name="getChannel"></a>
<h2>getChannel</h2>
getChannel( <a href='http://www-pw.physics.uiowa.edu/~jbf/autoplot/doc/org/das2/util/monitor/ProgressMonitor.html'>ProgressMonitor</a> monitor ) &rarr; <a href='https://docs.oracle.com/javase/8/docs/api/java/nio/channels/ReadableByteChannel.html'>java.nio.channels.ReadableByteChannel</a>

<p>opens a Channel, perhaps transferring the file to a local cache first.  monitor
 is used to monitor the download.</p>

<h3>Parameters</h3>
monitor - for monitoring the download.  The monitor won't be used when the access
   is immediate, for example with local FileObjects.

<h3>Returns:</h3>
a java.nio.channels.Channel for fast IO reads.
<br><br>
<a href="https://github.com/autoplot/dev/search?q=getChannel&unscoped_q=getChannel">[search for examples]</a>
 <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/das2/util/filesystem/FileObject.md">[view on GitHub]</a>
 <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/das2/util/filesystem/FileObject.html#getChannel">[view on old javadoc]</a>
 <a href="https://saturn.physics.uiowa.edu/svn/das2/dasCore/community/autoplot2011/trunk/dasCoreUtil/src/org/das2/util/filesystem/FileObject.java">[view source]</a>
<br>
<br>
getChannel(  ) &rarr; <a href='https://docs.oracle.com/javase/8/docs/api/java/nio/channels/ReadableByteChannel.html'>java.nio.channels.ReadableByteChannel</a><br>
<hr>
<a name="getChildren"></a>
<h2>getChildren</h2>
getChildren(  ) &rarr; <a href='http://www-pw.physics.uiowa.edu/~jbf/autoplot/doc/org/das2/util/filesystem/FileObject.html'>org.das2.util.filesystem.FileObject[]</a>

<p>returns objects within a folder.</p>

<h3>Returns:</h3>
an array of all FileObjects with the folder.
<br><br>
<a href="https://github.com/autoplot/dev/search?q=getChildren&unscoped_q=getChildren">[search for examples]</a>
 <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/das2/util/filesystem/FileObject.md">[view on GitHub]</a>
 <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/das2/util/filesystem/FileObject.html#getChildren">[view on old javadoc]</a>
 <a href="https://saturn.physics.uiowa.edu/svn/das2/dasCore/community/autoplot2011/trunk/dasCoreUtil/src/org/das2/util/filesystem/FileObject.java">[view source]</a>
<br>
<br>
<hr>
<a name="getFile"></a>
<h2>getFile</h2>
getFile( <a href='http://www-pw.physics.uiowa.edu/~jbf/autoplot/doc/org/das2/util/monitor/ProgressMonitor.html'>ProgressMonitor</a> monitor ) &rarr; <a href='https://docs.oracle.com/javase/8/docs/api/java/io/File.html'>java.io.File</a>

<p>gets a File object that can be opened by the client.  This may download a remote file, so
 a progress monitor can be used to monitor the download.</p>

<h3>Parameters</h3>
monitor - for monitoring the download.  The monitor won't be used when the access
   is immediate, for example with local FileObjects.

<h3>Returns:</h3>
a reference to a File that can be opened.
<br><br>
<a href="https://github.com/autoplot/dev/search?q=getFile&unscoped_q=getFile">[search for examples]</a>
 <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/das2/util/filesystem/FileObject.md">[view on GitHub]</a>
 <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/das2/util/filesystem/FileObject.html#getFile">[view on old javadoc]</a>
 <a href="https://saturn.physics.uiowa.edu/svn/das2/dasCore/community/autoplot2011/trunk/dasCoreUtil/src/org/das2/util/filesystem/FileObject.java">[view source]</a>
<br>
<br>
getFile(  ) &rarr; <a href='https://docs.oracle.com/javase/8/docs/api/java/io/File.html'>java.io.File</a><br>
<hr>
<a name="getInputStream"></a>
<h2>getInputStream</h2>
getInputStream( <a href='http://www-pw.physics.uiowa.edu/~jbf/autoplot/doc/org/das2/util/monitor/ProgressMonitor.html'>ProgressMonitor</a> monitor ) &rarr; <a href='https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html'>java.io.InputStream</a>

<p>opens an inputStream, perhaps transferring the file to a
  cache first.</p>

<h3>Parameters</h3>
monitor - for monitoring the download.  The monitor won't be used when the access
   is immediate, for example with local FileObjects.

<h3>Returns:</h3>
an InputStream
<br><br>
<a href="https://github.com/autoplot/dev/search?q=getInputStream&unscoped_q=getInputStream">[search for examples]</a>
 <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/das2/util/filesystem/FileObject.md">[view on GitHub]</a>
 <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/das2/util/filesystem/FileObject.html#getInputStream">[view on old javadoc]</a>
 <a href="https://saturn.physics.uiowa.edu/svn/das2/dasCore/community/autoplot2011/trunk/dasCoreUtil/src/org/das2/util/filesystem/FileObject.java">[view source]</a>
<br>
<br>
getInputStream(  ) &rarr; <a href='https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html'>java.io.InputStream</a><br>
<hr>
<a name="getNameExt"></a>
<h2>getNameExt</h2>
getNameExt(  ) &rarr; <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/String.html'>String</a>

<p>returns the canonical name of the file within the filesystem.  For example,
 in the local filesystem /mnt/data/steven/, /mnt/data/steven/jan/01.dat
 would be /jan/01.dat.

 For example, /a/b/c.dat.</p>

<h3>Returns:</h3>
the name of the file within the FileSystem.
<br><br>
<a href="https://github.com/autoplot/dev/search?q=getNameExt&unscoped_q=getNameExt">[search for examples]</a>
 <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/das2/util/filesystem/FileObject.md">[view on GitHub]</a>
 <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/das2/util/filesystem/FileObject.html#getNameExt">[view on old javadoc]</a>
 <a href="https://saturn.physics.uiowa.edu/svn/das2/dasCore/community/autoplot2011/trunk/dasCoreUtil/src/org/das2/util/filesystem/FileObject.java">[view source]</a>
<br>
<br>
<hr>
<a name="getParent"></a>
<h2>getParent</h2>
getParent(  ) &rarr; <a href='http://www-pw.physics.uiowa.edu/~jbf/autoplot/doc/org/das2/util/filesystem/FileObject.html'>org.das2.util.filesystem.FileObject</a>

<p>returns the parent FileObject (a folder).
 If the fileObject is root, then null should be returned.</p>

<h3>Returns:</h3>
the parent folder of this object.
<br><br>
<a href="https://github.com/autoplot/dev/search?q=getParent&unscoped_q=getParent">[search for examples]</a>
 <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/das2/util/filesystem/FileObject.md">[view on GitHub]</a>
 <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/das2/util/filesystem/FileObject.html#getParent">[view on old javadoc]</a>
 <a href="https://saturn.physics.uiowa.edu/svn/das2/dasCore/community/autoplot2011/trunk/dasCoreUtil/src/org/das2/util/filesystem/FileObject.java">[view source]</a>
<br>
<br>
<hr>
<a name="getSize"></a>
<h2>getSize</h2>
getSize(  ) &rarr; long

<p>returns the size of the file.</p>

<h3>Returns:</h3>
the size in bytes of the file, and -1 if the size is unknown.
<br><br>
<a href="https://github.com/autoplot/dev/search?q=getSize&unscoped_q=getSize">[search for examples]</a>
 <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/das2/util/filesystem/FileObject.md">[view on GitHub]</a>
 <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/das2/util/filesystem/FileObject.html#getSize">[view on old javadoc]</a>
 <a href="https://saturn.physics.uiowa.edu/svn/das2/dasCore/community/autoplot2011/trunk/dasCoreUtil/src/org/das2/util/filesystem/FileObject.java">[view source]</a>
<br>
<br>
<hr>
<a name="isData"></a>
<h2>isData</h2>
isData(  ) &rarr; boolean

<p>returns true if the file is a data file that to be used
  reading or writing data. (And not a folder.)</p>

<h3>Returns:</h3>
true if the file is a data file
<br><br>
<a href="https://github.com/autoplot/dev/search?q=isData&unscoped_q=isData">[search for examples]</a>
 <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/das2/util/filesystem/FileObject.md">[view on GitHub]</a>
 <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/das2/util/filesystem/FileObject.html#isData">[view on old javadoc]</a>
 <a href="https://saturn.physics.uiowa.edu/svn/das2/dasCore/community/autoplot2011/trunk/dasCoreUtil/src/org/das2/util/filesystem/FileObject.java">[view source]</a>
<br>
<br>
<hr>
<a name="isFolder"></a>
<h2>isFolder</h2>
isFolder(  ) &rarr; boolean

<p>indicates the type of FileObject</p>

<h3>Returns:</h3>
true if the object is a folder (directory).
<br><br>
<a href="https://github.com/autoplot/dev/search?q=isFolder&unscoped_q=isFolder">[search for examples]</a>
 <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/das2/util/filesystem/FileObject.md">[view on GitHub]</a>
 <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/das2/util/filesystem/FileObject.html#isFolder">[view on old javadoc]</a>
 <a href="https://saturn.physics.uiowa.edu/svn/das2/dasCore/community/autoplot2011/trunk/dasCoreUtil/src/org/das2/util/filesystem/FileObject.java">[view source]</a>
<br>
<br>
<hr>
<a name="isLocal"></a>
<h2>isLocal</h2>
isLocal(  ) &rarr; boolean

<p>returns true if the file is locally available, meaning clients can 
 call getFile() and the readable File reference will be available in
 interactive time.  Note that isLocal does not imply exists().  Also,
 This may result in side effects such as a website hit.</p>

<h3>Returns:</h3>
true if the file is locally available and fresh
<br><br>
<a href="https://github.com/autoplot/dev/search?q=isLocal&unscoped_q=isLocal">[search for examples]</a>
 <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/das2/util/filesystem/FileObject.md">[view on GitHub]</a>
 <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/das2/util/filesystem/FileObject.html#isLocal">[view on old javadoc]</a>
 <a href="https://saturn.physics.uiowa.edu/svn/das2/dasCore/community/autoplot2011/trunk/dasCoreUtil/src/org/das2/util/filesystem/FileObject.java">[view source]</a>
<br>
<br>
<hr>
<a name="isReadOnly"></a>
<h2>isReadOnly</h2>
isReadOnly(  ) &rarr; boolean

<p>true is the file is read-only.</p>

<h3>Returns:</h3>
true if the file is read-only
<br><br>
<a href="https://github.com/autoplot/dev/search?q=isReadOnly&unscoped_q=isReadOnly">[search for examples]</a>
 <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/das2/util/filesystem/FileObject.md">[view on GitHub]</a>
 <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/das2/util/filesystem/FileObject.html#isReadOnly">[view on old javadoc]</a>
 <a href="https://saturn.physics.uiowa.edu/svn/das2/dasCore/community/autoplot2011/trunk/dasCoreUtil/src/org/das2/util/filesystem/FileObject.java">[view source]</a>
<br>
<br>
<hr>
<a name="isRoot"></a>
<h2>isRoot</h2>
isRoot(  ) &rarr; boolean

<p>returns true if this is the root of the filesystem it came from.</p>

<h3>Returns:</h3>
true if this is the root of the filesystem it came from.
<br><br>
<a href="https://github.com/autoplot/dev/search?q=isRoot&unscoped_q=isRoot">[search for examples]</a>
 <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/das2/util/filesystem/FileObject.md">[view on GitHub]</a>
 <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/das2/util/filesystem/FileObject.html#isRoot">[view on old javadoc]</a>
 <a href="https://saturn.physics.uiowa.edu/svn/das2/dasCore/community/autoplot2011/trunk/dasCoreUtil/src/org/das2/util/filesystem/FileObject.java">[view source]</a>
<br>
<br>
<hr>
<a name="lastModified"></a>
<h2>lastModified</h2>
lastModified(  ) &rarr; <a href='https://docs.oracle.com/javase/8/docs/api/java/util/Date.html'>java.util.Date</a>

<p>returns the Date when the file was last modified.  or new Date(0L) if the date is
 not available.</p>

<h3>Returns:</h3>
the last modified Date, or new Date(0) if it is not available.
<br><br>
<a href="https://github.com/autoplot/dev/search?q=lastModified&unscoped_q=lastModified">[search for examples]</a>
 <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/das2/util/filesystem/FileObject.md">[view on GitHub]</a>
 <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/das2/util/filesystem/FileObject.html#lastModified">[view on old javadoc]</a>
 <a href="https://saturn.physics.uiowa.edu/svn/das2/dasCore/community/autoplot2011/trunk/dasCoreUtil/src/org/das2/util/filesystem/FileObject.java">[view source]</a>
<br>
<br>
<hr>
<a name="removeLocalFile"></a>
<h2>removeLocalFile</h2>
removeLocalFile(  ) &rarr; boolean

<p>remove the local file in the cache, if any.  This can/will be overriden by other 
 filesystems.</p>

<h3>Returns:</h3>
true if the action was handled.  (Local files are not deleted.)
<br><br>
<a href="https://github.com/autoplot/dev/search?q=removeLocalFile&unscoped_q=removeLocalFile">[search for examples]</a>
 <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/das2/util/filesystem/FileObject.md">[view on GitHub]</a>
 <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/das2/util/filesystem/FileObject.html#removeLocalFile">[view on old javadoc]</a>
 <a href="https://saturn.physics.uiowa.edu/svn/das2/dasCore/community/autoplot2011/trunk/dasCoreUtil/src/org/das2/util/filesystem/FileObject.java">[view source]</a>
<br>
<br>