@@ -138,21 +138,21 @@ export default class IBMiContent {
138
138
139
139
/**
140
140
* Download the content of a source member
141
- *
142
- * @param library
143
- * @param sourceFile
144
- * @param member
145
- * @param localPath
141
+ *
142
+ * @param library
143
+ * @param sourceFile
144
+ * @param member
145
+ * @param localPath
146
146
*/
147
147
async downloadMemberContent ( library : string , sourceFile : string , member : string , localPath ?: string ) : Promise < string > ;
148
148
/**
149
149
* @deprecated Will be removed in `v3.0.0`; use {@link IBMiContent.downloadMemberContent()} without the `asp` parameter instead.
150
- *
151
- * @param asp
152
- * @param library
153
- * @param sourceFile
154
- * @param member
155
- * @param localPath
150
+ *
151
+ * @param asp
152
+ * @param library
153
+ * @param sourceFile
154
+ * @param member
155
+ * @param localPath
156
156
*/
157
157
async downloadMemberContent ( asp : string | undefined , library : string , sourceFile : string , member : string , localPath ?: string ) : Promise < string > ;
158
158
async downloadMemberContent ( aspOrLibrary : string | undefined , libraryOrSourceFile : string , sourceFileOrMember : string , memberOrLocalPath ?: string , localPath ?: string ) : Promise < string > {
@@ -221,21 +221,21 @@ export default class IBMiContent {
221
221
222
222
/**
223
223
* Upload to a member
224
- *
225
- * @param library
226
- * @param sourceFile
227
- * @param member
228
- * @param content
224
+ *
225
+ * @param library
226
+ * @param sourceFile
227
+ * @param member
228
+ * @param content
229
229
*/
230
230
async uploadMemberContent ( library : string , sourceFile : string , member : string , content : string | Uint8Array ) : Promise < boolean > ;
231
231
232
232
/**
233
233
* @deprecated Will be removed in `v3.0.0`; use {@link IBMiContent.uploadMemberContent()} without the `asp` parameter instead.
234
- * @param asp
235
- * @param library
236
- * @param sourceFile
237
- * @param member
238
- * @param content
234
+ * @param asp
235
+ * @param library
236
+ * @param sourceFile
237
+ * @param member
238
+ * @param content
239
239
*/
240
240
async uploadMemberContent ( asp : string | undefined , library : string , sourceFile : string , member : string , content : string | Uint8Array ) : Promise < boolean > ;
241
241
async uploadMemberContent ( aspOrLibrary : string | undefined , libraryOrFile : string , sourceFileOrMember : string , memberOrContent : string | Uint8Array , content ?: string | Uint8Array ) : Promise < boolean > {
@@ -1153,9 +1153,8 @@ export default class IBMiContent {
1153
1153
*/
1154
1154
async copy ( paths : string | string [ ] , toPath : string ) : Promise < CommandResult > {
1155
1155
paths = Array . isArray ( paths ) ? paths : [ paths ] ;
1156
- toPath = Tools . escapePath ( toPath ) ;
1157
- const toPathIsDir = await this . isDirectory ( toPath ) ;
1158
- for ( const path of paths . map ( path => Tools . escapePath ( path ) ) ) {
1156
+ const toPathIsDir = await this . isDirectory ( Tools . escapePath ( toPath ) ) ;
1157
+ for ( const path of paths ) {
1159
1158
const result = await this . ibmi . runCommand ( { command : `COPY OBJ('${ path } ') ${ toPathIsDir ? 'TODIR(' : 'TOOBJ(' } '${ toPath } ') SUBTREE(*ALL) REPLACE(*YES)` , environment : "ile" } ) ;
1160
1159
if ( result . code !== 0 ) {
1161
1160
return result ;
0 commit comments