# kio Library API Documentation

Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Source Files

# KFileShare Class Reference

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

Since:
  3.1.

More...

`#include <kfileshare.h>`

Collaboration diagram for KFileShare:

[legend]
List of all members.

## Public Types

enum | Authorization { NotInitialized, ErrorNotFound, Authorized, UserNotAllowed }

## Static Public Member Functions

void | readConfig ()
| Called on application startup, to initialize authorization and shareList Can also be called later, when the configuration changes.
bool | isDirectoryShared (const QString &path)
| Call this to know if a directory is currently shared.
Authorization | authorization ()
| Call this to know if the current user is authorized to share directories.
QString | findExe (const char *exeName)
bool | setShared (const QString &path, bool shared)

## Detailed Description

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

Since:
  3.1.

Definition at line 49 of file kfileshare.h.

## Member Function Documentation

void KFileShare::readConfig | ( |  | ) | `[static]`

Called on application startup, to initialize authorization and shareList Can also be called later, when the configuration changes.

Definition at line 73 of file kfileshare.cpp.

References KProcess::Block, KProcess::exitStatus(), KProcIO::fgets(), QString::isEmpty(), KProcess::normalExit(), and KProcIO::start().

Referenced by KFileSharePropsPlugin::applyChanges(), authorization(), and isDirectoryShared().

bool KFileShare::isDirectoryShared | ( | const QString & | path | ) | `[static]`

| Call this to know if a directory is currently shared. Definition at line 129 of file kfileshare.cpp. References QString::length(), and readConfig(). Referenced by KFileItem::overlays().

KFileShare::Authorization KFileShare::authorization | ( |  | ) | `[static]`

| Call this to know if the current user is authorized to share directories. Definition at line 141 of file kfileshare.cpp. References readConfig().

The documentation for this class was generated from the following files:

- kfileshare.h
- kfileshare.cpp

This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Jan 28 13:18:25 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001