Mega Code Archive

 
Categories / Ruby / File Directory
 

Find out if a file has a length of zero (0) with zero

system("touch chap.txt") # Create a zero-length file with a system command File.zero?( "chap.txt" ) # => true