Module: FileSystem

Included in:
Core, Install
Defined in:
lib/dotfiles/utils/fs.rb

Overview

File: fs.rb Project: dotfiles-cli Author: exstnce ([email protected]) Created on Monday, 9th July 2018 9:47:06 pm

Class Method Summary collapse

Class Method Details

.contents(path) ⇒ Object



21
22
23
# File 'lib/dotfiles/utils/fs.rb', line 21

def self.contents(path)
  path+'*'
end

.mkdir(path) ⇒ Object



25
26
27
28
# File 'lib/dotfiles/utils/fs.rb', line 25

def self.mkdir(path)
  Dir.mkdir(path) unless File.exists?(path)
  path
end

.rglob(root) ⇒ Object



30
31
32
33
34
35
36
37
38
# File 'lib/dotfiles/utils/fs.rb', line 30

def self.rglob(root)
  files = Dir.glob(root+'.*')

  files.delete(root+'.dotfiles/')
  files.delete(root+'.')
  files.delete(root+'..')

  files
end