Class: File

Inherits:
Object
  • Object
show all
Defined in:
lib/gui/base.rb

Class Method Summary collapse

Class Method Details

.get_root_dir(this_path) ⇒ Object



743
744
745
746
747
748
749
750
# File 'lib/gui/base.rb', line 743

def self.get_root_dir this_path
  this_path = File.expand_path this_path
  if OS.doze?
    this_path[0..2]
  else
    this_path.split('/')[0]
  end
end

.strip_drive_windows(this_complete_path) ⇒ Object



752
753
754
755
756
757
758
# File 'lib/gui/base.rb', line 752

def self.strip_drive_windows this_complete_path
  if OS.doze?
    this_complete_path[2..-1]
  else
    this_complete_path
  end
end