windows - How can I get the username of the person who initialised the file in ruby? -


how can username of person initialised file in ruby?

i'm using windows xp. , ruby 1.9.2

try this:

require 'etc' file.stat("myfile").uid     ->      666 example puts 'my file owned by', etc.getpwuid(uid).name 

Comments

Popular posts from this blog

actionscript 3 - TweenLite does not work with object -

php - How can I edit my code to echo the data of child's element where my search term was found in, in XMLReader? -

c# - Global Variables vs. ASP.NET Session State -