I would like to get a list of Folder-Permissions in Ruby. As input i give e.g. 'c://temp' and output should be, which user/group has rights and which rights.
and the next thing is to pass a second parameter (user or group) so that ruby can tell me on which folder this group or user has rights (reading / writing etc.).
cant find anything and get_permissions from win32-file-gem doesn’t work.
thank in advance for any help.
Try to use win32-file-stat gem. For example:
will give you something like this:
#<File::Stat archive=false atime=1970-01-01 04:00:00 +0400 blksize=4096 blockdev=false blocks=0 compressed=false ctime=1970-01-01 04:00:00 +0400 dev=C: encrypted=false gid=0 hidden=false indexed=true ino=0 mode=040755 mtime=1970-01-01 04:00:00 +0400 nlink=1 normal=false offline=false rdev=2 readonly=false reparse_point=false size=0 sparse=false system=false temporary=false uid=0where you could see
mode,gidanduidas numbers, accessed by`f.mode,f.gidandf.uidrespectively.