rubyzip icon indicating copy to clipboard operation
rubyzip copied to clipboard

Make the various occurrences of `ftype` consistent, and aligned to `::File.ftype`

Open hainesr opened this issue 2 years ago • 0 comments

This discussion started in #530 with @fbacall.

We should be consistent with ::File.ftype on what we return for entries in a Zip archive.

Notes:

  • ::File.ftype returns a string: 'file', 'directory' or 'link' (others, e.g. 'socket' aren't relevant for Zip files)
  • Zip::Entry.ftype returns a symbol: :file, :directory or :symlink
  • Zip::FileSystem::File.ftype returns a string, but returns 'file' if the entry is a symlink
  • Zip::FileSystem::File::Stat.ftype returns a string, and an error (Unknown file type) if the entry is a symlink

hainesr avatar Jun 21 '22 09:06 hainesr