We can check that file already exist, readable and created using this method.
We can use this to check file already exist or not
File.exist?(file_path)
#true if file exist
#false if not exist
We can use this to check file readable or not
File.readable?(file_path)
#true if file readable
#false if not readable
We need this to check file already finish created or not
File.zero?(file_path)
#true if file exist but not yet finish created
#false if file exist and already created
No comments:
Post a Comment