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 2B3AFE0C6 for ; Mon, 7 Jan 2013 00:56:47 +0000 (UTC) Received: (qmail 58831 invoked by uid 500); 7 Jan 2013 00:56:46 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 58724 invoked by uid 500); 7 Jan 2013 00:56:46 -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 58683 invoked by uid 99); 7 Jan 2013 00:56:46 -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:56:46 +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.169 as permitted sender) Received: from [209.85.216.169] (HELO mail-qc0-f169.google.com) (209.85.216.169) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Jan 2013 00:56:41 +0000 Received: by mail-qc0-f169.google.com with SMTP id t2so11580230qcq.0 for ; Sun, 06 Jan 2013 16:56:20 -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=ZuIQuS9DH2ElaORK+4oY6w5aPhw6AF3YKlEpSQATMlc=; b=Pmg+7gtgsk8LPpRjoSekDZviS8xBcya5W3pyqniJQC+AM+FnipTPz558sakDkMHUif vuVEAJkwsyK94ZhFnd3I1cD0KxrQvpVEi7qPSxJbj8KUtlLENVrk6/bMMsZGIjmkx3lm zAnCW7j7L5LatnaIx7yiO+yKGF18AtlbPbW8AoA5zxeyeR4AAI8CDae1RNAM2OllDUHW IQjmkZQj7dDS6+uJk8nnCrruRq0srXXttPYxM7yPeAJUu7cetLhHig+CA0oPZpNA8o/9 j605amTb2UeSrqI2LN57IBgRcFW9R41rpr78FeAfIQlGzut0wctrNaehuFW/lZfZ483G /Utw== MIME-Version: 1.0 Received: by 10.49.74.73 with SMTP id r9mr47357785qev.44.1357520180626; Sun, 06 Jan 2013 16:56:20 -0800 (PST) Received: by 10.229.72.86 with HTTP; Sun, 6 Jan 2013 16:56:20 -0800 (PST) In-Reply-To: References: <6311711851346397744@unknownmsgid> <6152BDF053E74643B4C0A41150F5ADC3D30F95@USINVMAILB01.ingres.prv> Date: Sun, 6 Jan 2013 16:56:20 -0800 Message-ID: Subject: Re: [VFS] Support for File System Roots? From: Mark Fortner To: Commons Developers List Content-Type: multipart/alternative; boundary=047d7bdc11462443e804d2a84c9a X-Virus-Checked: Checked by ClamAV on apache.org --047d7bdc11462443e804d2a84c9a Content-Type: text/plain; charset=ISO-8859-1 Sorry, that should have read *FileSystem.listRoots()*. Cheers, Mark On Sun, Jan 6, 2013 at 4:50 PM, Mark Fortner 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/*, 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 >> >> > --047d7bdc11462443e804d2a84c9a--