Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
Re: Windows Advanced Permissions on Folders
Berger, Daniel
3/22/2006 3:31:00 PM
> -----Original Message-----
> From: Dave Burt [mailto:dave@burt.id.au]
> Sent: Wednesday, March 22, 2006 12:09 AM
> To: ruby-talk ML
> Subject: Re: Windows Advanced Permissions on Folders
>
>
> Archie Call wrote:
> > In a MS-Windows environment I know how to recurse all the folders
> > using a Dir.glob statement that starts a certain level of the
> > directory tree.
> >
> > I am struggling with a way in Ruby to set the advanced
> permissions for
> > certain folders:
> >
> > Properties
> > .Security
> > ...Advanced
> > .....View Edit
> > .......Permissions
> > .........13 Detailed kinds of specific permissions for the folder
> >
> > There must some kind of command to set these: Is it something with
> > Win32API?
>
> You can use Win32API to access Windows API calls directly.
> You probably
> don't want to.
>
> Try win32-utils' win32/file module. Its
> File.attributes(file_name) and
> File.set_attr(file_name, flags) support the following attributes:
> * archive
> * compressed
> * content_indexed
> * directory
> * encrypted
> * hidden
> * normal
> * offline
> * read_only
> * reparse_point
> * sparse_file
> * system
> * temporary* win32/file doco:
>
http://rubyforge.org/docman/view.php/85/3...
> * Rubyforge project:
http://rubyforge.org/projects/w...
> * download:
http://rubyforge.org/frs/?group_id=85&relea...
>
> Cheers,
> Dave
Yep, but I think the OP will want File.set_permissions. :)
Regards,
Dan
1 Answer
Dave Burt
3/23/2006 1:11:00 AM
0
Daniel wrote:
> Yep, but I think the OP will want File.set_permissions. :)
Thanks for the correction; maybe I should start reading the posts I reply
to!
Cheers,
Dave
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Re: Windows Advanced Permissions on Folders
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password