-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Labels
Description
Is your feature or enhancement request related to a problem or limitation? Please describe
For the Zowe Explorer FTP extension, we would like the ability to disable wildcard filtering, since the Zowe Explorer tree doesn't support it.
Describe your enhancement idea
Make the client-side wildcard filtering for UssUtils.listFiles method optional so that extenders like ZE can opt out:
zowe-cli-ftp-plugin/src/api/UssUtils.ts
Lines 35 to 51 in d902d8f
| // Only support wildcard matching in file names as follows. | |
| // "/dir1/dir2" | |
| // "/dir1/dir2/file*" => /^file.*$/ | |
| // "/dir1/dir2/*suffix" => /^.*suffix$/ | |
| // "/dir1/dir2/file*suffix" => /^file.*suffix$/ | |
| let directoryToList = directory; | |
| const slashPosN = directory.lastIndexOf("/"); | |
| let filter: (fileName: string) => boolean; | |
| if (slashPosN !== -1) { | |
| const lastPart = directory.substring(slashPosN + 1); | |
| if (lastPart.indexOf("*") !== -1) { | |
| directoryToList = directory.substring(0, slashPosN); | |
| const pattern = "^" + lastPart.replace(/\*/g, ".*") + "$"; | |
| filter = (fileName: string) => (fileName.match(pattern) != null); | |
| this.log.debug("Listing USS files in the directory '%s' with pattern '%s'", directoryToList, pattern); | |
| } | |
| } |
Describe alternatives you've considered
Provide any additional context
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Low Priority