chmodjob.h
// -*- c++ -*-
/* This file is part of the KDE libraries
Copyright (C) 2000 David Faure <faure@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef __kio_chmodjob_h__
#define __kio_chmodjob_h__
#include <kurl.h>
#include <qstring.h>
#include <kio/global.h>
#include <kio/job.h>
#include <kfileitem.h>
namespace KIO {
class KIO_EXPORT ChmodJob : public KIO::Job
{
Q_OBJECT
public:
ChmodJob( const KFileItemList & lstItems, int permissions, int mask,
int newOwner, int newGroup,
bool recursive, bool showProgressInfo );
protected:
void chmodNextFile();
protected slots:
virtual void slotResult( KIO::Job *job );
void slotEntries( KIO::Job * , const KIO::UDSEntryList & );
void processList();
private:
struct ChmodInfo
{
KURL url;
int permissions;
};
enum { STATE_LISTING, STATE_CHMODING } state;
int m_permissions;
int m_mask;
int m_newOwner;
int m_newGroup;
bool m_recursive;
KFileItemList m_lstItems;
QValueList<ChmodInfo> m_infos;
protected:
virtual void virtual_hook( int id, void* data );
private:
class ChmodJobPrivate* d;
};
KIO_EXPORT ChmodJob * chmod( const KFileItemList& lstItems, int permissions, int mask,
QString newOwner, QString newGroup,
bool recursive, bool showProgressInfo = true );
}
#endif
KIO::chmod
KIO_EXPORT ChmodJob * chmod(const KFileItemList &lstItems, int permissions, int mask, QString newOwner, QString newGroup, bool recursive, bool showProgressInfo=true)
Creates a job that changes permissions/ownership on several files or directories, optionally recursiv...
Definition: chmodjob.cpp:230
KIO::ChmodJob
This job changes permissions on a list of files or directories, optionally in a recursive manner...
Definition: chmodjob.h:38
KIO::Job
The base class for all jobs.
Definition: jobclasses.h:68

KDE Home | KDE Accessibility Home | Description of Access Keys