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 <garydgreg...@gmail.com>wrote:

> Would this only be for Windows? What do URIs look like?
>
> Gary
>
> On Dec 28, 2012, at 14:18, Mark Fortner <phidia...@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-unsubscr...@commons.apache.org
> For additional commands, e-mail: dev-h...@commons.apache.org
>
>

Reply via email to