async transferFiles({
    destination,
    fileList,
    direction,
    storageId,
    onError,
    onProgress,
    onCompleted,
  }) {
    checkIf(onError, 'function');
    checkIf(onProgress, 'function');
    checkIf(onCompleted, 'function');

    try {
      if (undefinedOrNull(destination)) {
        onError({
          error: `Invalid path`,
          stderr: null,
          data: null,
        });

        return;
      }

      const storageSelectCmd = `"storage ${storageId}"`;

      if (isEmpty(fileList) || !isArray(fileList)) {
        onError({
          error: `No files selected`,
          stderr: null,
          data: null,
        });

        return;
      }

      let cmdArgs = [];

      switch (direction) {
        case FILE_TRANSFER_DIRECTION.download:
          cmdArgs = (fileList ?? []).map((sourcePath) => {
            const destinationPath = path.resolve(destination);
            const escapedDestinationPath = this._escapeShellMtp(
              `${destinationPath}/${baseName(sourcePath)}`
            );
            const escapedSourcePath = `${this._escapeShellMtp(sourcePath)}`;

            return `-e ${storageSelectCmd} "get \\"${escapedSourcePath}\\" \\"${escapedDestinationPath}\\""`;
          });

          return this._transferFiles({
            cmdArgs,
            onError,
            onProgress,
            onCompleted,
          });

        case FILE_TRANSFER_DIRECTION.upload:
          cmdArgs = (fileList ?? []).map((sourcePath) => {
            const destinationPath = path.resolve(destination);
            const escapedDestinationPath = `${this._escapeShellMtp(
              destinationPath
            )}`;
            const escapedSourcePath = `${this._escapeShellMtp(sourcePath)}`;

            return `-e ${storageSelectCmd} "put \\"${escapedSourcePath}\\" \\"${escapedDestinationPath}\\""`;
          });

          return this._transferFiles({
            cmdArgs,
            onError,
            onProgress,
            onCompleted,
          });

        default:
          break;
      }
    } catch (e) {
      log.error(e);
    }
  }
description - Upload or download files from MTP device to local or vice versa

@param {string} destination
@param {'upload'|'download'} direction
@param {[string]} fileList
@param {string} storageId
@param {errorCallback} onError
@param {progressCallback} onProgress
@param {completedCallback} onCompleted

@return