~ubuntu-filemanager-dev/ubuntu-filemanager-app/trunk

« back to all changes in this revision

Viewing changes to src/plugin/folderlistmodel/disk/disklocationitemdir.cpp

  • Committer: Bileto Bot
  • Date: 2017-04-04 17:06:41 UTC
  • mfrom: (588.1.19 fix-desktop-file)
  • Revision ID: ci-train-bot@canonical.com-20170404170641-1p15lmx8wodlx2ut
* Rename binary file to ubuntu-filemanager-app
* Join plugin packages into the main package 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**************************************************************************
 
2
 *
 
3
 * Copyright 2015 Canonical Ltd.
 
4
 * Copyright 2015 Carlos J Mazieri <carlos.mazieri@gmail.com>
 
5
 *
 
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.
 
9
 *
 
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.
 
14
 *
 
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/>.
 
17
 *
 
18
 * File: disklocationitemdir.cpp
 
19
 * Date: 16/05/2015
 
20
 */
 
21
 
 
22
#include "disklocationitemdir.h"
 
23
#include <QDir>
 
24
 
 
25
DiskLocationItemDir::DiskLocationItemDir(const QString &dir) : LocationItemDir(dir), m_qtQDir(new QDir())
 
26
{
 
27
    if(!dir.isNull() && !dir.isEmpty())
 
28
    {
 
29
        m_qtQDir->setPath(dir);
 
30
    }
 
31
}
 
32
 
 
33
 
 
34
DiskLocationItemDir::~DiskLocationItemDir()
 
35
{
 
36
    delete m_qtQDir;
 
37
}
 
38
 
 
39
bool DiskLocationItemDir::exists() const
 
40
{
 
41
    return m_qtQDir->exists();
 
42
}
 
43
 
 
44
 
 
45
bool DiskLocationItemDir::mkdir(const QString& dir) const
 
46
{
 
47
    return m_qtQDir->mkdir(dir);
 
48
}
 
49
 
 
50
 
 
51
bool DiskLocationItemDir::mkpath(const QString& dir) const
 
52
{
 
53
     return m_qtQDir->mkpath(dir);
 
54
}
 
55
 
 
56
 
 
57
bool DiskLocationItemDir::rmdir(const QString& dir) const
 
58
{
 
59
    return m_qtQDir->rmdir(dir);
 
60
}
 
61