Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

The WebDAV client for PHP

NotificationsYou must be signed in to change notification settings

ngmy/l4-dav

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build StatusCoverage Status

A simple WebDAV client library for Laravel 4.

Requirements

The L4Dav has the following requirements:

  • PHP 5.3+

  • Laravel 4.0+

Dependencies

The L4Dav has the following dependencies:

Installation

Add the package to yourcomposer.json and runcomposer update:

{"require": {"ngmy/l4-dav":"dev-master"    }}

Add the following to the list of service providers inapp/config/app.php:

'Ngmy\L4Dav\L4DavServiceProvider',

Add the following to the list of class aliases inapp/config/app.php:

'L4Dav' =>'Ngmy\L4Dav\Facades\L4Dav',

Configuration

After installing, you can publish the package's configuration file into your application, by running the following command:

php artisan config:publish ngmy/l4-dav

This will publish the config file toapp/config/packages/ngmy/l4-dav/config.php where you modify the package configuration.

Examples

Basic Usage

Download a file from the WebDAV server

L4Dav::get('path/to/remote/file','/path/to/local/file');

Upload a file to the WebDAV server

L4Dav::put('/path/to/local/file','path/to/remote/file');

Delete a file on the WebDAV server

L4Dav::delete('path/to/remote/file');

Copy a file on the WebDAV server

L4Dav::copy('path/to/source/file','path/to/dest/file');

Rename a file on the WebDAV server

L4Dav::move('path/to/source/file','path/to/dest/file');

Make a directory on the WebDAV server

L4Dav::mkdir('path/to/remote/directory/');

Check the existence of a directory on the WebDAV server

L4Dav::exists('path/to/remote/directory/');

List contents of a directory on the WebDAV server

L4Dav::ls('path/to/remote/directory/');

Get Response

Get the status code

$response = L4Dav::put('/path/to/local/file','path/to/remote/file');$response->getStatus();

Get the status message

$response = L4Dav::put('/path/to/local/file','path/to/remote/file');$response->getMessage();

Get the response body

$response = L4Dav::put('/path/to/local/file','path/to/remote/file');$response->getBody();

[8]ページ先頭

©2009-2025 Movatter.jp