KFileShare

KFileShare Namespace Reference

Enumerations

enum  Authorization { NotInitialized, ErrorNotFound, Authorized, UserNotAllowed }
 
enum  ShareMode { Simple, Advanced }
 

Functions

Authorization authorization ()
 
QString fileShareGroup ()
 
bool isDirectoryShared (const QString &path)
 
bool isRestricted ()
 
bool nfsEnabled ()
 
void readConfig ()
 
void readShareList ()
 
bool sambaEnabled ()
 
bool setShared (const QString &path, bool shared)
 
ShareMode shareMode ()
 
bool sharingEnabled ()
 

Detailed Description

Common functionality for the file sharing (communication with the backend)

Deprecated:
since 5.0, use KSambaShare and KNFSShare.

Enumeration Type Documentation

The used share mode.

Simple means that the simple sharing dialog is used and users can share only folders from there HOME folder. Advanced means that the advanced sharing dialog is used and users can share any folder.

Definition at line 70 of file kfileshare.h.

Function Documentation

KFileShare::Authorization KFileShare::authorization ( )

Call this to know if the current user is authorized to share directories.

Definition at line 237 of file kfileshare.cpp.

QString KFileShare::fileShareGroup ( )

Returns the group that is used for file sharing.

That is, all users in that group are allowed to share files if file sharing is restricted.

Definition at line 166 of file kfileshare.cpp.

bool KFileShare::isDirectoryShared ( const QString path)

Call this to know if a directory is currently shared.

Definition at line 225 of file kfileshare.cpp.

bool KFileShare::isRestricted ( )

Returns whether file sharing is restricted.

If it is not restricted every user can shar files. If it is restricted only users in the configured file share group can share files.

Definition at line 157 of file kfileshare.cpp.

bool KFileShare::nfsEnabled ( )

Returns whether NFS is enabled.

Definition at line 184 of file kfileshare.cpp.

void KFileShare::readConfig ( )

Reads the file share configuration file.

Definition at line 108 of file kfileshare.cpp.

void KFileShare::readShareList ( )

Reads the list of shared folders.

Definition at line 193 of file kfileshare.cpp.

bool KFileShare::sambaEnabled ( )

Returns whether Samba is enabled.

Definition at line 175 of file kfileshare.cpp.

bool KFileShare::setShared ( const QString path,
bool  shared 
)

Uses a suid perl script to share the given path with NFS and Samba.

Parameters
paththe path to share
sharedwhether the path should be shared or not
Returns
whether the perl script was successful

Definition at line 246 of file kfileshare.cpp.

KFileShare::ShareMode KFileShare::shareMode ( )

Returns the configured share mode.

Definition at line 139 of file kfileshare.cpp.

bool KFileShare::sharingEnabled ( )

Returns whether sharing is enabled If this is false, file sharing is disabled and nobody can share files.

Definition at line 148 of file kfileshare.cpp.

This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Nov 30 2020 22:59:28 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.