Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipse-incubator-e4-dev] [resources] Java7 / JSR203 and EFS

Thanks for the JSR203 info. FWIW, we (ECF) are committed to building nio/nio2-based providers for the ECF filetransfer API. I think it would be a mistake to define yet another (i.e. EFS-async) API in preference to using/extending/enhancing/integrating what ECF already has (e.g. particularly WRT progress reporting and cancellation).


Oberhuber, Martin wrote:
Hi all,
I investigated a little bit more about JSR203 (nio2 / filesystem access),
and here's some data points:

    * The most current data about JSR203 is from the binary early
      access download [1] <>.
      Install this on your system, read the
      sources, try it out or generate Javadocs from it -- the original
      JSR203 document as from the JCP is outdated, e.g. the package
      name changed from java.nio.filesystem to java.nio.file.
      The full Jdk7 EA downloads also don't have nio2 in it yet!
    * A 1-hour YouTube video (from a techtalk at Google, May 1) is
      available here [2]
    * A nice list of additional pointers is here [3]
      <>, with a (slightly
      HTML  overview here [4]

In terms of its relation to EFS, I think the more interesting bits are

    * *Monitoring API*, which Szymon has mentioned already
    * *File Attribute Views*, which allow requesting a set of file
      with optimized operations. EFS only has IFileStore#fetchInfo(),
      which is OK right now (since all info to be fetched is available by
      means of a stat() call), but is less than optimal if we want to
      other kinds of attribute information... since we wouldn't want
      to burden
      clients which only need the modtime, for instance, with a full
      that fetches information not needed.
    * *Creating Symbolic Links*
    * *Allowing URI *for converting from/to File/Path -- nice for EFS :-)
    * *DirectoryStream* for async directory retrieval -- all other
      operations are
      synchronous, so I'm questioning whether we really need full async
      support in EFS for reading attributes etc. I haven't yet fully
      the AsynchronousFilechannel class.
    * *Support for Locking* files against other programs
    * *Path.isSameFile(Path)* basically a fast equals() without
      I find this a very interesting feature for Alias Management,
      depending on the
      algorithms to be used... just imagine being able to use a very
      fast UNIX
      inode number for checking fiel equality, instead of doing
    * *Provider Interface, *so if we're writing an EFS implementation
      based on
      JSR 203, adopters can implement a custom JSR203 filesystem beneath.

EFS is better than JSR203 when it comes to *progress reporting and cancellation* -- all the JSR203 operations seem atomic (readAttributes(), copyTo(), moveTo()) whereas
EFS allows IProgressMonitor for these operations.
Attached is a little test program I wrote (under EPL), if you are interested.
Of course, this needs the JSR203 ea from [1] to run :-)
The output of my program is this:

p2URI: file:///C:/PROGRA~1/ <file:///C:/PROGRA%7E1/>
realpath: C:\Program Files
canonical: C:\Program Files
compareTo: 0

[4] Cheers,
*Martin Oberhuber*, Senior Member of Technical Staff, *Wind River*
Target Management Project Lead, DSDP PMC Member

eclipse-incubator-e4-dev mailing list

Back to the top