Extension SDK 10.1.2

oracle.ide.net
Class URLFileSystem.FileInfo

java.lang.Object
  extended byoracle.ide.net.URLFileSystem.FileInfo
Enclosing class:
URLFileSystem

public static class URLFileSystem.FileInfo
extends java.lang.Object

The FileInfo class encapsulates the information describing files returned by the URLFileSystem.ls(URL) and URLFileSystem.ls(URL, URLFilter) methods.

The information contained by each FileInfo object is current only as of the time the object was constructed. The underlying fields of the FileInfo object will contain out of date information if the underlying file system object is modified after the FileInfo object has been constructed.


Constructor Summary
protected URLFileSystem.FileInfo(java.io.File file, int attributes, long lastModified, long length)
          Constructs a FileInfo object given the specified initial starting field values.
protected URLFileSystem.FileInfo(java.io.File parent, java.lang.String name, int attributes, long lastModified, long length)
          Constructs a FileInfo object given the specified initial starting field values.
protected URLFileSystem.FileInfo(java.lang.String path, int attributes, long lastModified, long length)
          Constructs a FileInfo object given the specified initial starting field values.
protected URLFileSystem.FileInfo(java.lang.String parent, java.lang.String name, int attributes, long lastModified, long length)
          Constructs a FileInfo object given the specified initial starting field values.
protected URLFileSystem.FileInfo(java.net.URL url)
          Constructs a FileInfo object from the specified URL.
protected URLFileSystem.FileInfo(java.net.URL url, int attributes, long lastModified, long length)
          Constructs a FileInfo object given the specified initial starting field values.
 
Method Summary
 java.net.URL getURL()
          Returns the URL of the file or directory denoted by this object.
 boolean isDirectory()
          Returns whether the file was a directory at the time this object was constructed.
 boolean isFile()
          Returns whether the file was a normal file at the time this object was constructed.
 boolean isHidden()
          Returns whether the file was a hidden file at the time this object was constructed.
 long lastModified()
          Returns the time that the file was last modified, at the time this object was constructed.
 long length()
          Returns the length of the file, in bytes, at the time this object was constructed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

URLFileSystem.FileInfo

protected URLFileSystem.FileInfo(java.net.URL url)
Constructs a FileInfo object from the specified URL. The fields of the object are populated by querying the respective URLFileSystem methods for the given URL.

NOTE: This constructor exists merely for convenience, and should not be generally used, as it is the least performant way to construct a FileInfo object.


URLFileSystem.FileInfo

protected URLFileSystem.FileInfo(java.io.File parent,
                                 java.lang.String name,
                                 int attributes,
                                 long lastModified,
                                 long length)
Constructs a FileInfo object given the specified initial starting field values.

Parameters:
parent - The parent directory File.
name - The name of the file.
attributes - The abstract attributes of the file.
lastModified - The time that the file was last modified.
length - The length of the file.

URLFileSystem.FileInfo

protected URLFileSystem.FileInfo(java.lang.String parent,
                                 java.lang.String name,
                                 int attributes,
                                 long lastModified,
                                 long length)
Constructs a FileInfo object given the specified initial starting field values.

Parameters:
parent - The parent directory path.
name - The name of the file.
attributes - The abstract attributes of the file.
lastModified - The time that the file was last modified.
length - The length of the file.

URLFileSystem.FileInfo

protected URLFileSystem.FileInfo(java.io.File file,
                                 int attributes,
                                 long lastModified,
                                 long length)
Constructs a FileInfo object given the specified initial starting field values.

Parameters:
file - The File.
attributes - The abstract attributes of the file.
lastModified - The time that the file was last modified.
length - The length of the file.

URLFileSystem.FileInfo

protected URLFileSystem.FileInfo(java.lang.String path,
                                 int attributes,
                                 long lastModified,
                                 long length)
Constructs a FileInfo object given the specified initial starting field values.

Parameters:
path - The path of the file.
attributes - The abstract attributes of the file.
lastModified - The time that the file was last modified.
length - The length of the file.

URLFileSystem.FileInfo

protected URLFileSystem.FileInfo(java.net.URL url,
                                 int attributes,
                                 long lastModified,
                                 long length)
Constructs a FileInfo object given the specified initial starting field values.

Parameters:
url - The URL of the file.
attributes - The abstract attributes of the file.
lastModified - The time that the file was last modified.
length - The length of the file.
Method Detail

getURL

public java.net.URL getURL()
Returns the URL of the file or directory denoted by this object.


isDirectory

public boolean isDirectory()
Returns whether the file was a directory at the time this object was constructed.

See Also:
URLFileSystem.isDirectory(URL)

isFile

public boolean isFile()
Returns whether the file was a normal file at the time this object was constructed. A file is normal if it is not a directory and, in addition, satisfies other system-dependent criteria.

See Also:
URLFileSystem.isRegularFile(URL)

isHidden

public boolean isHidden()
Returns whether the file was a hidden file at the time this object was constructed. The exact definition of hidden is system-dependent.

See Also:
URLFileSystem.isHidden(URL)

lastModified

public long lastModified()
Returns the time that the file was last modified, at the time this object was constructed.

See Also:
URLFileSystem.lastModified(URL)

length

public long length()
Returns the length of the file, in bytes, at the time this object was constructed.

See Also:
URLFileSystem.getLength(URL)

Extension SDK

 

Copyright © 1997, 2004, Oracle. All rights reserved.