org.kde.koala

Class KFileShare

public class KFileShare extends Object implements QtSupport

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

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

Field Summary
static intAdvanced
static intAuthorized
static intErrorNotFound
static intNotInitialized
static intSimple
The used share mode.
static intUserNotAllowed
Constructor Summary
protected KFileShare(Class dummy)
KFileShare()
Method Summary
static intauthorization()
Call this to know if the current user is authorized to share directories
voiddispose()
Delete the wrapped C++ instance ahead of finalize()
static StringfileShareGroup()
Returns the group that is used for file sharing.
protected voidfinalize()
Deletes the wrapped C++ instance
static StringfindExe(String exeName)
static booleanisDirectoryShared(String path)
Call this to know if a directory is currently shared
booleanisDisposed()
Has the wrapped C++ instance been deleted?
static booleanisRestricted()
Returns whether file sharing is restricted.
static booleannfsEnabled()
Returns whether NFS is enabled
static voidreadConfig()
Reads the file share configuration file
static voidreadShareList()
Reads the list of shared folders
static booleansambaEnabled()
Returns whether Samba is enabled
static booleansetShared(String path, boolean shared)
Uses a suid perl script to share the given path with NFS and Samba
static intshareMode()
Returns the configured share mode
static booleansharingEnabled()
Returns whether sharing is enabled If this is false, file sharing is disabled and nobody can share files.

Field Detail

Advanced

public static final int Advanced

Authorized

public static final int Authorized

ErrorNotFound

public static final int ErrorNotFound

NotInitialized

public static final int NotInitialized

Simple

public static final int Simple
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.

UNKNOWN: The used share mode.

UserNotAllowed

public static final int UserNotAllowed

Constructor Detail

KFileShare

protected KFileShare(Class dummy)

KFileShare

public KFileShare()

Method Detail

authorization

public static int authorization()
Call this to know if the current user is authorized to share directories

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

dispose

public void dispose()
Delete the wrapped C++ instance ahead of finalize()

fileShareGroup

public static String 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.

UNKNOWN: Returns the group that is used for file sharing.

finalize

protected void finalize()
Deletes the wrapped C++ instance

findExe

public static String findExe(String exeName)

isDirectoryShared

public static boolean isDirectoryShared(String path)
Call this to know if a directory is currently shared

UNKNOWN: Call this to know if a directory is currently shared

isDisposed

public boolean isDisposed()
Has the wrapped C++ instance been deleted?

isRestricted

public static boolean 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.

UNKNOWN: Returns whether file sharing is restricted.

nfsEnabled

public static boolean nfsEnabled()
Returns whether NFS is enabled

UNKNOWN: Returns whether NFS is enabled

readConfig

public static void readConfig()
Reads the file share configuration file

UNKNOWN: Reads the file share configuration file

readShareList

public static void readShareList()
Reads the list of shared folders

UNKNOWN: Reads the list of shared folders

sambaEnabled

public static boolean sambaEnabled()
Returns whether Samba is enabled

UNKNOWN: Returns whether Samba is enabled

setShared

public static boolean setShared(String path, boolean shared)
Uses a suid perl script to share the given path with NFS and Samba

Parameters: path the path to share shared whether the path should be shared or not

Returns: whether the perl script was successful

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

shareMode

public static int shareMode()
Returns the configured share mode

UNKNOWN: Returns the configured share mode

sharingEnabled

public static boolean sharingEnabled()
Returns whether sharing is enabled If this is false, file sharing is disabled and nobody can share files.

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