Overview

Packages

  • Jyxo_Beholder
  • Jyxo_Charset
  • Jyxo_Color
  • Jyxo_Css
  • Jyxo_ErrorHandling
  • Jyxo_FirePhp
  • Jyxo_Gettext
    • Parser
  • Jyxo_Html
  • Jyxo_Input
    • Chain
    • Filter
    • Validator
  • Jyxo_Mail
    • Email
    • Parser
    • Sender
  • Jyxo_Rpc
    • Json
    • Xml
  • Jyxo_Shell
  • Jyxo_SpamFilter
  • Jyxo_Spl
  • Jyxo_String
  • Jyxo_Svn
  • Jyxo_Time
  • Jyxo_Timer
  • Jyxo_Webdav
  • Jyxo_XmlReader
  • PHP

Classes

  • Jyxo_Webdav_Client

Exceptions

  • Jyxo_Webdav_Exception
  • Jyxo_Webdav_FileNotExistException
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated

Class Jyxo_Webdav_Client

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

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