Return-Path: X-Original-To: apmail-commons-dev-archive@www.apache.org Delivered-To: apmail-commons-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 66E5BE0A4 for ; Mon, 7 Jan 2013 00:50:41 +0000 (UTC) Received: (qmail 44113 invoked by uid 500); 7 Jan 2013 00:50:41 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 43729 invoked by uid 500); 7 Jan 2013 00:50:40 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 43721 invoked by uid 99); 7 Jan 2013 00:50:40 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Jan 2013 00:50:40 +0000 X-ASF-Spam-Status: No, hits=1.7 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of phidias51@gmail.com designates 209.85.216.182 as permitted sender) Received: from [209.85.216.182] (HELO mail-qc0-f182.google.com) (209.85.216.182) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Jan 2013 00:50:35 +0000 Received: by mail-qc0-f182.google.com with SMTP id k19so11547536qcs.13 for ; Sun, 06 Jan 2013 16:50:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=XWEC1HXUg170MM0Cy2PU+aXYILlNgSZg2Skssf0sosc=; b=mXcxmpGz8hlHg0162LmgKRfYt//N5hHDcZSM0ej9GFNfI8hjCTKWL+YMdHSwuCF7oy qzZtPlYRpeRvfDtqeZlz1Ua21W7FX57KU62GxLlHzXh4bE0rM/i1o815jnjgkDtuvDSz btOJP8VDJ2h5JIPXxK0LHJ67AT8ooFSOe72Gg88IL0KQfOWF86hkztlQer0b9rJKptYR hV462pqDgyQtMarOBMqC4cdEs2QxEZQfL6AqTTDFdIOIWPimltxzK8mC5CKLXp0ZJU7t 5Idygrcdb5/JCSkI05sqI1zqZrsKBRtUWgO19f/phJiGMt9+R/S7pPnA2V/cqtR87z0L 2Cqw== MIME-Version: 1.0 Received: by 10.49.72.136 with SMTP id d8mr48491294qev.62.1357519815252; Sun, 06 Jan 2013 16:50:15 -0800 (PST) Received: by 10.229.72.86 with HTTP; Sun, 6 Jan 2013 16:50:15 -0800 (PST) In-Reply-To: <6152BDF053E74643B4C0A41150F5ADC3D30F95@USINVMAILB01.ingres.prv> References: <6311711851346397744@unknownmsgid> <6152BDF053E74643B4C0A41150F5ADC3D30F95@USINVMAILB01.ingres.prv> Date: Sun, 6 Jan 2013 16:50:15 -0800 Message-ID: Subject: Re: [VFS] Support for File System Roots? From: Mark Fortner To: Commons Developers List Content-Type: multipart/alternative; boundary=047d7b6d99645d1a6304d2a836e4 X-Virus-Checked: Checked by ClamAV on apache.org --047d7b6d99645d1a6304d2a836e4 Content-Type: text/plain; charset=ISO-8859-1 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 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/*, on a > Windows box that might be */Users/*. 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//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 > wrote: > > > Would this only be for Windows? What do URIs look like? > > > > Gary > > > > On Dec 28, 2012, at 14:18, Mark Fortner 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 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 > > --047d7b6d99645d1a6304d2a836e4--