diff --git a/include/dwarfs/entry.h b/include/dwarfs/entry.h index dc864347..103ca26f 100644 --- a/include/dwarfs/entry.h +++ b/include/dwarfs/entry.h @@ -82,7 +82,6 @@ class entry : public entry_interface { bool less_revpath(entry const& rhs) const; size_t size() const override { return stat_.size; } virtual type_t type() const = 0; - std::string type_string() const override; bool is_directory() const override; virtual void walk(std::function const& f); virtual void walk(std::function const& f) const; diff --git a/include/dwarfs/entry_interface.h b/include/dwarfs/entry_interface.h index bd53b890..a90a0fde 100644 --- a/include/dwarfs/entry_interface.h +++ b/include/dwarfs/entry_interface.h @@ -38,7 +38,6 @@ class entry_interface : public object { virtual std::string dpath() const = 0; virtual std::string unix_dpath() const = 0; virtual std::string const& name() const = 0; - virtual std::string type_string() const = 0; virtual size_t size() const = 0; virtual bool is_directory() const = 0; diff --git a/src/dwarfs/entry.cpp b/src/dwarfs/entry.cpp index 53da0fc5..1d50079d 100644 --- a/src/dwarfs/entry.cpp +++ b/src/dwarfs/entry.cpp @@ -140,30 +140,6 @@ bool entry::less_revpath(entry const& rhs) const { return static_cast(rhs_p); } -std::string entry::type_string() const { - switch (stat_.type()) { - case posix_file_type::regular: - return "file"; - case posix_file_type::directory: - return "directory"; - case posix_file_type::symlink: - return "link"; - case posix_file_type::character: - return "chardev"; - case posix_file_type::block: - return "blockdev"; - case posix_file_type::fifo: - return "fifo"; - case posix_file_type::socket: - return "socket"; - default: - break; - } - - DWARFS_THROW(runtime_error, fmt::format("unknown file type: {:#06x}", - fmt::underlying(stat_.type()))); -} - bool entry::is_directory() const { return stat_.is_directory(); } void entry::walk(std::function const& f) { f(this); }