Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 28783 invoked from network); 2 Jan 2006 20:08:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 2 Jan 2006 20:08:45 -0000 Received: (qmail 48330 invoked by uid 500); 2 Jan 2006 20:08:39 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 48279 invoked by uid 500); 2 Jan 2006 20:08:39 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Users List" Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 48268 invoked by uid 99); 2 Jan 2006 20:08:39 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Jan 2006 12:08:39 -0800 X-ASF-Spam-Status: No, hits=2.9 required=10.0 tests=DNS_FROM_RFC_ABUSE,MAILTO_TO_SPAM_ADDR,RCVD_IN_NJABL_PROXY,RCVD_IN_SORBS_SOCKS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [68.142.229.98] (HELO smtp107.sbc.mail.re2.yahoo.com) (68.142.229.98) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 02 Jan 2006 12:08:38 -0800 Received: (qmail 94302 invoked from network); 2 Jan 2006 20:08:17 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Received:Message-ID:Date:From:User-Agent:X-Accept-Language:MIME-Version:To:Subject:References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=sdn8JnhRHubAxi7G0VGN4YbnOTyUZcrgtoeUovOV+ARKTTP+o6TW2T6WWAWQp1YlObqzQGfnQCpi3USza4D9aLOetdVWUkBUzC721fKuBfdyr9Uss7QMTj/7vCsmX9HxD++xUdAP6b6SU6efDsr/7y4P7P5wncp6HMkC4nex4Dw= ; Received: from unknown (HELO ?192.168.1.200?) (phidias51@68.89.167.135 with plain) by smtp107.sbc.mail.re2.yahoo.com with SMTP; 2 Jan 2006 20:08:17 -0000 Message-ID: <43B9882F.2090103@yahoo.com> Date: Mon, 02 Jan 2006 14:08:15 -0600 From: Mark Fortner User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jakarta Commons Users List Subject: Re: VFS Questions References: <43B9823E.3020908@yahoo.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Valerio, Thanks for the input, however, I'm trying to use the VFS library to handle the file operations. This would allow me to rename files sitting on NFS volumes, or WebDAV volumes. The example you gave me was for the java.io.File object which would only work for local files. Thanks anyway, Mark Valerio Schiavoni wrote: >Hi Mark > >2006/1/2, Mark Fortner : > > >> 4. I'd like to be able to rename a file. But I don't see a very >> straightforward way of doing it. There's a move method, and a >> canBeRenamedTo method, but nothing that explicitly allows me to >> rename the file and that takes a string. This might be added to >> FileUtil if you want to keep the current API the same. >> >> > > >my 2 cents: > > // File (or directory) with old name > File file = new File(*"oldname"*); > > // File (or directory) with new name > File file2 = new File(*"newname"*); > > // Rename file (or directory) > boolean success = file.renameTo(file2); > if (!success) { > // File was not successfully renamed > } > >hope it helps. > >cheers, >valerio > > 5. There doesn't seem to be an easy way to "select" a file. For > > >> example, if you are creating a table model and you want to display >> a checkbox to indicate that the file is selected, there isn't a >> method like "isSelected" to determine if the file is currently >> selected. >> >>Mark Fortner >> >>--------------------------------------------------------------------- >>To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org >>For additional commands, e-mail: commons-user-help@jakarta.apache.org >> >> >> >> > > >-- >To Iterate is Human, to Recurse, Divine >James O. Coplien, Bell Labs > > > --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org