Thursday, 12 February 2015

get parent or sibling folder/file based on current file location

def create_temp_file()
  @temp_fpath= ''  begin    @temp_fpath = File.absolute_path('..\src\features\data\tempfile.txt')
    create_file(@temp_fpath, 'Sample text')
  rescue Exception => e    puts e.message
  end  @temp_fpathend

No comments:

Post a Comment