commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Gregory <garydgreg...@gmail.com>
Subject Re: [VFS] Support for File System Roots?
Date Mon, 07 Jan 2013 06:24:34 GMT
Ok, that sounds interesting. Can you give us some examples? I sounds like
it makes sense for file:// only. Did you have it in mind for other file
systems?

Should the treatment of '~' be optional? Is there a chance of it being
confused with any kind of legal file reference on any OS?

Gary


On Sun, Jan 6, 2013 at 7:50 PM, Mark Fortner <phidias51@gmail.com> wrote:

> Gary,
> The File#getRoots() method that you mentioned gets the file system roots
> and not user-specific directories like Documents, Downloads, Photos, Music,
> etc.
>
> I ended up creating a solution with maps of directories for each operating
> system (or relevant OS version in the case of Windows).  I also implemented
> a solution for resolving "~" as the home directory in URLs.  I can check
> these into my project and send you the URLs for the files if you're
> interested.
>
> Cheers,
>
> Mark
>
>
>
> On Sun, Jan 6, 2013 at 3:18 PM, Roger L. Whitcomb <
> Roger.Whitcomb@actian.com
> > wrote:
>
> > I'm actually working on a similar project to make a new version of the
> > Apache Pivot File Browser to use VFS.  So, I'd also be interested to see
> > what suggestions the developers here have.
> >
> > ~Roger Whitcomb
> >
> > -----Original Message-----
> > From: Mark Fortner [mailto:phidias51@gmail.com]
> > Sent: Friday, December 28, 2012 11:54 AM
> > To: Commons Developers List
> > Subject: Re: [VFS] Support for File System Roots?
> >
> > Hi Gary,
> > This would be per operating system.  So, if I call
> > *RootFactory.getRoot(RootNames.HOME)
> > *from a Linux box, that would resolve to */home/<username>*, on a
> > Windows box that might be */Users/<username>*.  It would be driven by
> > the *
> > System.getProperty("user.home")* variable.  The other roots, are OS
> > dependent and are subdirectories of the home directory.  You might also
> > have another method like *getRoot(RootNames.HOME, OS.LINUX)* that would
> > let you get the value for Linux, even if you aren't on a Linux box.
> >
> > The URIs might look like "/Documents" which would resolve to
> > "file:///home/<username>/Documents".
> >
> > This came up because I'm reworking a Swing file manager using JavaFX and
> > I wanted to clean up the API some and minimize any VFS specific
> > workarounds I was doing.
> >
> > Cheers,
> >
> > Mark
> >
> >
> >
> > On Fri, Dec 28, 2012 at 11:42 AM, Gary Gregory
> > <garydgregory@gmail.com>wrote:
> >
> > > Would this only be for Windows? What do URIs look like?
> > >
> > > Gary
> > >
> > > On Dec 28, 2012, at 14:18, Mark Fortner <phidias51@gmail.com> wrote:
> > >
> > > > I was wondering if there were any plans (or currently any way) to
> > > > support File System Roots.  In addition to the standard sorts of
> > > > roots, there are roots like your home directory, the Documents,
> > > > Photos, Music, Downloads, etc.
> > > >
> > > > At a minimum it would be useful to have an Enum of the different
> > > directory
> > > > names, with some way of resolving them.  Something like:
> > > >
> > > > FileObject root = RootFactory.getRoot(RootNames.HOME);
> > > >
> > > > and
> > > >
> > > > Map<String, FileObject> rootMap = RootFactory.getRoots();
> > > >
> > > >
> > > > Cheers,
> > > >
> > > > Mark
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > > For additional commands, e-mail: dev-help@commons.apache.org
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > For additional commands, e-mail: dev-help@commons.apache.org
> >
> >
>



-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
JUnit in Action, 2nd Ed: <http://goog_1249600977>http://bit.ly/ECvg0
Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message