After a brief glance, my first impression is that we should stick to something more simple, like we have now on FileObject. We have isWritable(), so we could add setWritable().
Adding a class hierarchy and more fancy permissions feels like it leaks into Java 7-land. I see two avenues: - a simple solution for VFS2 - start VFS3 based on Java 7, which will not look anything like the VFS we know today. Gary On Tue, Jun 26, 2012 at 10:52 AM, Benjamin Piwowarski <benja...@bpiwowar.net > wrote: > Hi, > > I started to implement a file permission (or more generally a file > properties) framework for VFS. I attached a patch to VFS-405 issue ( > https://issues.apache.org/jira/browse/VFS-405 ) since it matches the bug > description. > > The patch 0001 adds basic permission support in the form of a > FileProperties (more general) object that can be accessed through > getFileProperties in FileObject. In the patch, there are four types of > properties: > • FileProperties: the abstract base class > • AbstractPermission: the abstract base class for permission > properties > • JavaPermissions: java like file permissions > • PosixPermissions: POSIX (user/group/others) permissions > The patch provides initial support for sftp and local filesystem. > > In the longer term, it would make some methods (isHidden, etc.) deprecated > since the functionality would be duplicated. > > Please comment on this before I put more efforts in this patch. > > Benjamin > > On Jun 25, 2012, at 20:29 , Gary Gregory wrote: > > > On Mon, Jun 25, 2012 at 1:03 PM, Benjamin Piwowarski > > <benja...@bpiwowar.net>wrote: > > > >> Hi all, > >> > >> I was wondering if there were any plans for the "Get/set the file > >> permissions" item in the TODO list. I would like to contribute on that > (at > >> least for sftp and local), but I would like to know the planned > >> architecture for such a feature (if any). > >> > > > > Not from me ATM. Feel free to give it a go. > > > > Can anyone see reason why we should not have setters like we have getters > > for: > > > > - org.apache.commons.vfs2.FileObject.isHidden() > > - org.apache.commons.vfs2.FileObject.isReadable() > > - org.apache.commons.vfs2.FileObject.isWriteable() > > > > Should there also be other checks? isExecutable()? > > > > Gary > > > > > >> > >> Thanks > >> Benjamin Piwowarski > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org > >> For additional commands, e-mail: dev-h...@commons.apache.org > >> > >> > > > > > > -- > > E-Mail: garydgreg...@gmail.com | ggreg...@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 > > -- > Benjamin Piwowarski > LIP6/CNRS, University Pierre et Marie Curie (UPMC) > case 169 – 4, Place de Jussieu – 75252 Paris cedex 05 – France > benja...@bpiwowar.net > http://www.bpiwowar.net/ > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org > For additional commands, e-mail: dev-h...@commons.apache.org > > -- E-Mail: garydgreg...@gmail.com | ggreg...@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