Method: Minitar::Reader::EntryStream#directory
- Defined in:
- lib/minitar/reader.rb
#directory ⇒ Boolean
Returns true if the entry represents a directory.
88 89 90 91 92 93 94 95 96 97 98 99 100 |
# File 'lib/minitar/reader.rb', line 88 def directory? case @typeflag when "5" true when "0", "\0" # If the name ends with a slash, treat it as a directory. This is what other # major tar implementations do for interoperability and compatibility with older # tar variants and some new ones. @name.end_with?("/") else false end end |