/*! * * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. * \copyright \n * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, \n * IN PART OR IN WHOLE, \n * WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. \n * * \file filehandler.cpp * \date 2019/09/30 * \author Behrouz NematiPour * */ #include "filehandler.h" //Qt #include #include // Project using namespace Storage; FileHandler::FileHandler(QObject *parent) : QObject(parent) { connect(&fsWatcher, &QFileSystemWatcher::directoryChanged, this, &FileHandler::directoryChanged); } bool FileHandler::init() { fsWatcher.addPath("/dev/"); return true; } void FileHandler::directoryChanged() { qDebug() << QFileInfo::exists("/dev/sda"); } bool FileHandler::mountUsb() { return true; }