blob: f3323a8b5e285cd3c89ea2a366ec20d03a02ab8f [file] [log] [blame]
#pragma once
#include <phosphor-logging/lg2.hpp>
#include <filesystem>
namespace phosphor
{
namespace usb
{
namespace fs = std::filesystem;
class USBManager
{
public:
~USBManager() = default;
USBManager() = delete;
USBManager(const USBManager&) = delete;
USBManager(USBManager&&) = default;
USBManager& operator=(const USBManager&) = delete;
USBManager& operator=(USBManager&&) = default;
explicit USBManager(const fs::path& path) : usbPath(path)
{}
/** @brief Find the first file with a .tar extension according to the USB
* file path.
*
* @return Success or Fail
*/
bool run();
private:
/** The USB path detected. */
const fs::path& usbPath;
};
} // namespace usb
} // namespace phosphor