KIO
Go to the documentation of this file.
22 #include <QtCore/QDir>
23 #include <QtCore/QFile>
24 #include <QtCore/Q_PID>
45 #define FILESHARECONF "/etc/security/fileshare.conf"
51 QString path = QString::fromLocal8Bit(qgetenv(
"PATH"));
53 path += QLatin1String(
":/usr/sbin");
57 kError() << exeName <<
"not found in" << path;
94 const QByteArray data=cg.
readEntry(key, QByteArray());
96 if (!data.isEmpty()) {
97 if (data.toLower() ==
"simple")
99 else if (data.toLower() ==
"advanced")
113 s_sharingEnabled = group.
readEntry(
"FILESHARING",
true);
114 s_restricted = group.
readEntry(
"RESTRICT",
true);
115 s_fileShareGroup = group.
readEntry(
"FILESHAREGROUP",
"fileshare");
118 if (!s_sharingEnabled)
135 s_sambaEnabled = group.
readEntry(
"SAMBA",
true);
136 s_nfsEnabled = group.
readEntry(
"NFS",
true);
186 s_shareList->clear();
195 if ( !proc.waitForFinished() ) {
196 kError() <<
"Can't run" << exe;
202 while (!proc.atEnd()) {
203 QString line = proc.readLine().trimmed();
204 int length = line.length();
207 if ( line[length-1] !=
'/' )
209 s_shareList->append(line);
210 kDebug(7000) <<
"Shared dir:" << line;
218 if ( ! s_shareList.exists() )
222 if ( path[path.length()-1] !=
'/' )
224 return s_shareList->contains( path );
241 kDebug(7000) << path <<
"," << shared;
252 int ec = QProcess::execute( exe, args );
253 kDebug(7000) <<
"exitCode=" << ec;
292 #include "kfileshare_p.moc"
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Wed Jun 5 2013 18:38:47 by
doxygen 1.8.3.1 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.