Commit a624af50 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

fs: factory: Remove now unused createFile method

parent 31848008
......@@ -44,11 +44,6 @@ namespace factory
///
virtual std::shared_ptr<fs::IDirectory> createDirectory( const std::string& path ) = 0;
///
/// \brief createFile creates a representation of a file
/// \param fileName an absolute path to a file
///
virtual std::shared_ptr<fs::IFile> createFile( const std::string& fileName ) = 0;
///
/// \brief createDevice creates a representation of a device
/// \param uuid The device UUID
/// \return A representation of the device, or nullptr if the device is currently unavailable.
......
......@@ -62,11 +62,6 @@ std::shared_ptr<fs::IDirectory> FileSystemFactory::createDirectory( const std::s
}
}
std::shared_ptr<fs::IFile> FileSystemFactory::createFile(const std::string& fileName)
{
return std::unique_ptr<fs::IFile>( new fs::File( fileName ) );
}
std::shared_ptr<fs::IDevice> FileSystemFactory::createDevice( const std::string& uuid )
{
return fs::Device::fromUuid( uuid );
......
......@@ -35,7 +35,6 @@ namespace factory
public:
FileSystemFactory();
virtual std::shared_ptr<fs::IDirectory> createDirectory( const std::string& path ) override;
virtual std::shared_ptr<fs::IFile> createFile( const std::string& fileName ) override;
virtual std::shared_ptr<fs::IDevice> createDevice( const std::string& uuid ) override;
virtual void refresh() override;
......
......@@ -166,15 +166,6 @@ struct FileSystemFactory : public factory::IFileSystem
return d->directory( path );
}
virtual std::shared_ptr<fs::IFile> createFile( const std::string &filePath ) override
{
auto d = device( filePath );
if ( d == nullptr )
return nullptr;
auto f = d->file( filePath );
return f;
}
virtual std::shared_ptr<fs::IDevice> createDevice( const std::string& uuid ) override
{
auto it = std::find_if( begin( devices ), end( devices ), [uuid]( const std::shared_ptr<Device>& d ) {
......@@ -301,11 +292,6 @@ public:
return nullptr;
}
virtual std::shared_ptr<fs::IFile> createFile( const std::string &fileName ) override
{
return std::shared_ptr<fs::IFile>( new NoopFile( fileName ) );
}
virtual std::shared_ptr<fs::IDevice> createDevice( const std::string& ) override
{
return nullptr;
......
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