Overview

Namespaces

  • Jyxo
    • Beholder
      • TestCase
    • Gettext
      • Parser
    • Input
      • Chain
      • Filter
      • Validator
    • Mail
      • Email
        • Attachment
      • Parser
      • Sender
    • Rpc
      • Json
      • Xml
    • Shell
    • Spl
    • Svn
    • Time
    • Webdav
  • PHP

Classes

  • Client

Exceptions

  • Exception
  • FileNotExistException
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated

Class Client

Client for work with WebDav. Uses the http PHP extension.

Namespace: Jyxo\Webdav
Category: Jyxo
Package: Jyxo\Webdav
Copyright: Copyright (c) 2005-2011 Jyxo, s.r.o.
License: https://github.com/jyxo/php/blob/master/license.txt
Author: Jaroslav HanslĂ­k
Located at Webdav/Client.php
Methods summary
public
# __construct( array $servers )

Constructor.

Constructor.

Parameters

$servers
array
public
# setOption( string $name, mixed $value )

Sets an option.

Sets an option.

Parameters

$name
string
Option name
$value
mixed
Option value
public boolean
# exists( string $path )

Checks if a file exists.

Checks if a file exists.

Parameters

$path
string
File path

Returns

boolean

Throws

Jyxo\Webdav\Exception
On error
public string
# get( string $path )

Returns file contents.

Returns file contents.

Parameters

$path
string
File path

Returns

string

Throws

Jyxo\Webdav\FileNotExistException
If the file does not exist
Jyxo\Webdav\Exception
On error
public mixed
# getProperty( string $path, string $property = '' )

Returns a file property. If no particular property is set, all properties are returned.

Returns a file property. If no particular property is set, all properties are returned.

Parameters

$path
string
File path
$property
string
Property name

Returns

mixed

Throws

Jyxo\Webdav\FileNotExistException
If the file does not exist
Jyxo\Webdav\Exception
On error
public boolean
# put( string $path, string $data )

Saves data to a remote file.

Saves data to a remote file.

Parameters

$path
string
File path
$data
string
Data

Returns

boolean

Throws

Jyxo\Webdav\Exception
On error
public boolean
# putFile( string $path, string $file )

Saves file contents to a remote file.

Saves file contents to a remote file.

Parameters

$path
string
File path
$file
string
Local file path

Returns

boolean

Throws

Jyxo\Webdav\Exception
On error
public boolean
# copy( string $pathFrom, string $pathTo )

Copies a file. Does not work on Lighttpd.

Copies a file. Does not work on Lighttpd.

Parameters

$pathFrom
string
Source file path
$pathTo
string
Target file path

Returns

boolean

Throws

Jyxo\Webdav\Exception
On error
public boolean
# rename( string $pathFrom, string $pathTo )

Renames a file. Does not work on Lighttpd.

Renames a file. Does not work on Lighttpd.

Parameters

$pathFrom
string
Original file name
$pathTo
string
New file name

Returns

boolean

Throws

Jyxo\Webdav\Exception
On error
public boolean
# unlink( string $path )

Deletes a file. Contains a check preventing from deleting directories.

Deletes a file. Contains a check preventing from deleting directories.

Parameters

$path
string
Directory path

Returns

boolean

Throws

Jyxo\Webdav\Exception
On error
public boolean
# isDir( string $dir )

Checks if a directory exists.

Checks if a directory exists.

Parameters

$dir
string
Directory path

Returns

boolean

Throws

Jyxo\Webdav\Exception
On error
public boolean
# mkdir( string $dir, boolean $recursive = true )

Creates a directory.

Creates a directory.

Parameters

$dir
string
Directory path
$recursive
boolean
Create directories recursively?

Returns

boolean

Throws

Jyxo\Webdav\Exception
On error
public boolean
# rmdir( string $dir )

Deletes a directory.

Deletes a directory.

Parameters

$dir
string
Directory path

Returns

boolean

Throws

Jyxo\Webdav\Exception
On error
Jyxo PHP Library API documentation generated by ApiGen 2.3.0