Hi guys, I have a simple question, maybe stupid… It’s just, how can I check if a dir is empty but by ignoring hidden files ?
So if a dir have only hidden files, I want to considere it as empty.
Hi guys, I have a simple question, maybe stupid… It’s just, how can I check if a dir is empty but by ignoring hidden files ?
So if a dir have only hidden files, I want to considere it as empty.
Dir.glob("foo/*").empty?
If you want get hidden file list
Dir.glob("foo/.*, match_hidden: true)