RemotePath Property
Selects a remote resource by path.
Syntax
onedrive.getRemotePath([callback]) onedrive.setRemotePath( remotePath, [callback])
Default Value
""
Callback
The 'callback' parameter specifies a function which will be called when the operation completes (or an error is encountered). If the 'callback' parameter is not specified, then the method will block and will not return until the operation completes (or an error is encountered).
The callback for the getRemotePath([callback]) method is defined as:
function(err, data){ }
'err' is the error that occurred. If there was no error, then 'err' is 'null'.
'data' is the value returned by the method.
The callback for the setRemotePath([callback]) method is defined as:
function(err){ }
'err' is the error that occurred. If there was no error, then 'err' is 'null'.
'err' has 2 properties which hold detailed information:
err.code err.message
Remarks
This property selects a remote file or folder resource to operate against using its path. The path provided must be absolute (that is, relative to the root of the currently selected drive).
Remote Id and Path Notes
Keep the following things in mind when setting the RemoteId and/or RemotePath properties:
- If both RemoteId and RemotePath are set, RemoteId is used.
- The Id or path provided must always be for a resource that resides in the drive currently selected by Drive.
- Some methods operate against only file or only folder resources; while others can operate against either one. Calling a method while RemoteId/RemotePath is set to the Id/path of a resource whose type is unsupported will cause the server to return an error; use the table below to determine which resource types each method supports.
Key: X = Supported; - = Not supported.Method Name Files Folders CopyResource X X CreateFolder - X CreateLink X X DeleteResource X X DownloadFile X - GetResourceInfo X X ListResources - X MoveResource X X Search - X UpdateResource X X UploadFile - X - Methods that support only folder resources can also operate against the root of the currently selected drive, just clear both RemoteId and RemotePath.
- Some methods may have other restrictions, refer to each one for more information.
This property is not available at design time.
Data Type
String