mirror of
https://github.com/mhx/dwarfs.git
synced 2025-09-10 13:04:15 -04:00
chore(entry): remove unused type_string() method
This commit is contained in:
parent
1e0eeacfd6
commit
c104dedc32
@ -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<void(entry*)> const& f);
|
||||
virtual void walk(std::function<void(const entry*)> const& f) const;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -140,30 +140,6 @@ bool entry::less_revpath(entry const& rhs) const {
|
||||
return static_cast<bool>(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<void(entry*)> const& f) { f(this); }
|
||||
|
Loading…
x
Reference in New Issue
Block a user