Method: FileMonitoring::FileMonitoring#create_sub_paths

Defined in:
lib/file_monitoring/file_monitoring.rb

#create_sub_paths(path) ⇒ Object



14
15
16
17
18
19
20
21
# File 'lib/file_monitoring/file_monitoring.rb', line 14

def create_sub_paths(path)
  sub_paths=[]
  while path != '.' && path != '/'
    sub_paths.push(path)
    path = File.dirname(path)
  end
  sub_paths.reverse!
end