1
/**************************************************************************
3
* Copyright 2015 Canonical Ltd.
4
* Copyright 2015 Carlos J Mazieri <carlos.mazieri@gmail.com>
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU Lesser General Public License as published by
8
* the Free Software Foundation; version 3.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU Lesser General Public License for more details.
15
* You should have received a copy of the GNU Lesser General Public License
16
* along with this program. If not, see <http://www.gnu.org/licenses/>.
18
* File: disklocationitemdir.cpp
22
#include "disklocationitemdir.h"
25
DiskLocationItemDir::DiskLocationItemDir(const QString &dir) : LocationItemDir(dir), m_qtQDir(new QDir())
27
if(!dir.isNull() && !dir.isEmpty())
29
m_qtQDir->setPath(dir);
34
DiskLocationItemDir::~DiskLocationItemDir()
39
bool DiskLocationItemDir::exists() const
41
return m_qtQDir->exists();
45
bool DiskLocationItemDir::mkdir(const QString& dir) const
47
return m_qtQDir->mkdir(dir);
51
bool DiskLocationItemDir::mkpath(const QString& dir) const
53
return m_qtQDir->mkpath(dir);
57
bool DiskLocationItemDir::rmdir(const QString& dir) const
59
return m_qtQDir->rmdir(dir);