Comparing version 1.3.0 to 1.4.0
15
API.md
@@ -95,2 +95,3 @@ ## Modules | ||
* [ClientInterface](#ClientInterface) : <code>Object</code> | ||
* [.copyFile(remotePath, targetRemotePath, [options])](#ClientInterface.copyFile) ⇒ <code>Promise</code> | ||
* [.createDirectory(dirPath, [options])](#ClientInterface.createDirectory) ⇒ <code>Promise</code> | ||
@@ -107,2 +108,16 @@ * [.createReadStream(remoteFilename, [options])](#ClientInterface.createReadStream) ⇒ <code>Readable</code> | ||
<a name="ClientInterface.copyFile"></a> | ||
### ClientInterface.copyFile(remotePath, targetRemotePath, [options]) ⇒ <code>Promise</code> | ||
Copy a remote item to another path | ||
**Kind**: static method of [<code>ClientInterface</code>](#ClientInterface) | ||
**Returns**: <code>Promise</code> - A promise that resolves once the request has completed | ||
| Param | Type | Description | | ||
| --- | --- | --- | | ||
| remotePath | <code>String</code> | The remote item path | | ||
| targetRemotePath | <code>String</code> | The path file will be copied to | | ||
| [options] | [<code>OptionsWithHeaders</code>](#OptionsWithHeaders) | Options for the request | | ||
<a name="ClientInterface.createDirectory"></a> | ||
@@ -109,0 +124,0 @@ |
# WebDAV-client changelog | ||
## 1.3.0 | ||
_2018-03-07_ | ||
* Change `deepmerge` dependency to `merge` | ||
* ([#79](https://github.com/perry-mitchell/webdav-client/issues/79)): getFileContents arrayBuffer default causes incompatibilities | ||
* Use `buffer()` where available, and fallback to `arrayBuffer()` otherwise | ||
## 1.2.1 | ||
@@ -4,0 +11,0 @@ _2018-02-26_ |
@@ -16,2 +16,3 @@ "use strict"; | ||
var move = require("./interface/moveFile.js"); | ||
var copy = require("./interface/copyFile.js"); | ||
var putFile = require("./interface/putFile.js"); | ||
@@ -65,2 +66,15 @@ var stats = require("./interface/stat.js"); | ||
/** | ||
* Copy a remote item to another path | ||
* @param {String} remotePath The remote item path | ||
* @param {String} targetRemotePath The path file will be copied to | ||
* @param {OptionsWithHeaders=} options Options for the request | ||
* @memberof ClientInterface | ||
* @returns {Promise} A promise that resolves once the request has completed | ||
*/ | ||
copyFile: function copyFile(remotePath, targetRemotePath, options) { | ||
var copyOptions = merge(baseOptions, options || {}); | ||
return copy.copyFile(remotePath, targetRemotePath, copyOptions); | ||
}, | ||
/** | ||
* Create a directory | ||
@@ -67,0 +81,0 @@ * @param {String} dirPath The path to create |
{ | ||
"name": "webdav", | ||
"version": "1.3.0", | ||
"version": "1.4.0", | ||
"description": "WebDAV client for NodeJS", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -12,2 +12,4 @@  | ||
Please read our [contribution guide](CONTRIBUTING.md) if you plan on making an issue or PR. | ||
## Installation | ||
@@ -20,5 +22,2 @@ To install for use with NodeJS, execute the following shell command: | ||
### Webpack / Browserify | ||
WebDAV-client is browser friendly, after being transpiled. Refer to the use of WebDAV-fs in the [Buttercup mobile compatibility library](https://github.com/buttercup/buttercup-mobile-compat) or the [Buttercup browser extension](https://github.com/buttercup/buttercup-browser-extension) for guidance on preparation for the web. | ||
## Usage | ||
@@ -48,2 +47,5 @@ Usage is very simple ([API](API.md)) - the main exported object is a factory to create adapter instances: | ||
#### copyFile(remotePath, targetPath _[, options]_) | ||
Copy a file or directory from one path to another. | ||
#### createDirectory(remotePath _[, options]_) | ||
@@ -249,1 +251,6 @@ Create a new directory at the remote path. | ||
* [webdav-server](https://github.com/OpenMarshal/npm-WebDAV-Server) | ||
### Webpack / Browserify | ||
WebDAV-client is browser friendly, after being transpiled. Refer to the use of WebDAV-fs in the [Buttercup mobile compatibility library](https://github.com/buttercup/buttercup-mobile-compat) or the [Buttercup browser extension](https://github.com/buttercup/buttercup-browser-extension) for guidance on preparation for the web. | ||
Please note that it is _not_ the responsibility of this library to be compatible with Webpack or Browserify. Small modifications may be made here to support them, but no guarantees of compatibility are made as there are an almost infinite number of configurations in both systems that could potentially cause issues with this library or a dependency therein. |
55596
25
741
253
11