]),
opId = getNextOpId();
- if (!CommonFS.isVirtualPath(args.destinationDirectory)) {
- throw new WebAPIException(
- WebAPIException.TYPE_MISMATCH_ERR,
- 'Destination directory should be virtual path or file.'
- );
- }
+ var realDestinationPath = CommonFS.toRealPath(args.destinationDirectory);
var callArgs = {
- destinationDirectory: CommonFS.toRealPath(args.destinationDirectory),
+ destinationDirectory: realDestinationPath,
stripName: args.stripName || null,
overwrite: args.overwrite || null,
opId: opId,
]),
opId = getNextOpId();
- if (!CommonFS.isVirtualPath(args.sourceFile)) {
- throw new WebAPIException(
- WebAPIException.TYPE_MISMATCH_ERR,
- 'sourceFile should be virtual path or file.'
- );
- }
+ var realSourcePath = CommonFS.toRealPath(args.sourceFile);
var optionsAttributes = [
'destination',
checkMode(this.mode, ['w', 'rw', 'a']);
var callArgs = {
- sourceFile: CommonFS.toRealPath(args.sourceFile),
+ sourceFile: realSourcePath,
options: options,
opId: opId,
handle: getHandle()
]),
opId = getNextOpId();
- if (!CommonFS.isVirtualPath(args.destinationDirectory)) {
- throw new WebAPIException(
- WebAPIException.TYPE_MISMATCH_ERR,
- 'destinationDirectory should be virtual path or file.'
- );
- }
+ var realDestinationPath = CommonFS.toRealPath(args.destinationDirectory);
checkMode(this.mode, ['r', 'rw']);
var callArgs = {
- destinationDirectory: CommonFS.toRealPath(args.destinationDirectory),
+ destinationDirectory: realDestinationPath,
overwrite: args.overwrite || null,
opId: opId,
handle: getHandle()
}
}
- if (!CommonFS.isVirtualPath(args.file)) {
- throw new WebAPIException(
- WebAPIException.TYPE_MISMATCH_ERR,
- 'file should be virtual path or file.'
- );
- }
+ var realPath = CommonFS.toRealPath(args.file);
var callArgs = {
- file: CommonFS.toRealPath(args.file),
+ file: realPath,
mode: args.mode,
options: options,
opId: opId