ADVERTISEMENT
ADVERTISEMENT

Ruby Directories Programs

A directory is a location where the files can be stored. In Ruby programming language, the "Dir" class and the "FileUtils" module are used to manage the directories and the File class is used to handle the files.

This section contains Ruby directories programs, practice these Ruby programs to learn the concept of Ruby directories, these programs contain the solved code, outputs, and the detailed explanation of the statements, functions used in the Ruby directories programs.

List of Ruby Directories Programs

  1. Ruby program to create a directory
  2. Ruby program to check a directory is exist or not
  3. Ruby program to print the current working directory
  4. Ruby program to remove a specified directory
  5. Ruby program to get the list the name of files in a specified directory
  6. Ruby program to get the current working directory using Dir::getwd() method
  7. Ruby program to delete an empty directory using Dir::unlink(), Dir::delete() methods
  8. Ruby program to get the list of filenames matching the specified wild card pattern
  9. Ruby program to get the filename one by one using Dir::foreach() method
  10. Ruby program to print the home directory of the current user
  11. Ruby program to change the current directory using Dir::chdir() method

ADVERTISEMENT
ADVERTISEMENT


Comments and Discussions!



ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT

Languages: » C » C++ » C++ STL » Java » Data Structure » C#.Net » Android » Kotlin » SQL
Web Technologies: » PHP » Python » JavaScript » CSS » Ajax » Node.js » Web programming/HTML
Solved programs: » C » C++ » DS » Java » C#
Aptitude que. & ans.: » C » C++ » Java » DBMS
Interview que. & ans.: » C » Embedded C » Java » SEO » HR
CS Subjects: » CS Basics » O.S. » Networks » DBMS » Embedded Systems » Cloud Computing
» Machine learning » CS Organizations » Linux » DOS
More: » Articles » Puzzles » News/Updates

© https://www.includehelp.com some rights reserved.