Commit 57599e3c authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen
Browse files

IDirectory: Remove isRemovable method

This is IDevice's job now
parent f44f6ae3
......@@ -43,6 +43,5 @@ namespace fs
virtual const std::vector<std::string>& dirs() = 0;
virtual unsigned int lastModificationDate() const = 0;
virtual std::shared_ptr<IDevice> device() const = 0;
virtual bool isRemovable() const = 0;
};
}
......@@ -78,12 +78,6 @@ std::shared_ptr<IDevice> Directory::device() const
return Device::fromPath( m_path );
}
bool Directory::isRemovable() const
{
//FIXME
return false;
}
std::string Directory::toAbsolute(const std::string& path)
{
auto abs = std::unique_ptr<char[]>( new char[PATH_MAX] );
......
......@@ -37,7 +37,6 @@ public:
virtual const std::vector<std::string>& dirs() override;
virtual unsigned int lastModificationDate() const override;
virtual std::shared_ptr<IDevice> device() const override;
virtual bool isRemovable() const override;
private:
static std::string toAbsolute( const std::string& path );
......
......@@ -101,7 +101,6 @@ public:
: m_path( path )
, m_parent( parent )
, m_lastModificationDate( lastModif )
, m_isRemovable( false )
, m_device( device )
{
}
......@@ -279,18 +278,6 @@ public:
m_lastModificationDate++;
}
virtual bool isRemovable() const override
{
return m_isRemovable;
}
void markRemovable()
{
m_isRemovable = true;
}
private:
std::string m_path;
std::unordered_map<std::string, std::shared_ptr<File>> m_files;
......@@ -299,7 +286,6 @@ private:
std::vector<std::string> m_dirPathes;
Directory* m_parent;
unsigned int m_lastModificationDate;
bool m_isRemovable;
std::shared_ptr<Device> m_device;
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment