Class: Vagrant::Util::FileMode
- Inherits:
-
Object
- Object
- Vagrant::Util::FileMode
- Defined in:
- lib/vagrant/util/file_mode.rb
Class Method Summary collapse
-
.from_octal(octal) ⇒ Object
This returns the file permissions as a string from an octal number.
Class Method Details
.from_octal(octal) ⇒ Object
This returns the file permissions as a string from an octal number.
6 7 8 9 |
# File 'lib/vagrant/util/file_mode.rb', line 6 def self.from_octal(octal) perms = sprintf("%o", octal) perms.reverse[0..2].reverse end |