Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
716e1bc
feat: command for downloading all members of PDS to local directory
JWaters02 Feb 9, 2025
72877ab
Attempt on tests
JWaters02 Feb 14, 2025
5bb37c1
Merge remote-tracking branch 'JWaters02/main' into feat/download-ds
JWaters02 May 24, 2025
08de650
refactor: smarter attempt at downloadAllMembers
JWaters02 May 24, 2025
ab2535a
store download options in local storage
JWaters02 May 25, 2025
f87c6b5
WIP
JWaters02 Jun 5, 2025
7a9b90f
Merge remote-tracking branch 'origin/main' into feat/download-ds
JWaters02 Aug 15, 2025
42fcb20
wip: downloading
JWaters02 Aug 23, 2025
c4eaeb4
Merge remote-tracking branch 'origin/main' into feat/download-ds
JWaters02 Aug 23, 2025
7ea6ff2
wip: downloading
JWaters02 Aug 23, 2025
8eafadb
wip: downloading
JWaters02 Aug 24, 2025
d230ec0
wip: add downloadDataSet and move common quickpick to helper
JWaters02 Aug 24, 2025
116d596
refactor: reduce code duplication
JWaters02 Aug 24, 2025
2d2b5ac
Merge remote-tracking branch 'origin/main' into feat/download-ds
JWaters02 Aug 30, 2025
fa100fb
feat: download uss files/directories
JWaters02 Aug 30, 2025
5f81fc3
fix: count dir children recursively
JWaters02 Aug 30, 2025
17fc579
Merge remote-tracking branch 'origin/main' into feat/download-ds
JWaters02 Oct 4, 2025
a663383
Merge remote-tracking branch 'origin/main' into feat/download-ds
JWaters02 Oct 8, 2025
9c6c4ed
refactor: fallback to profile encoding
JWaters02 Oct 18, 2025
4a039fc
Merge remote-tracking branch 'origin/main' into feat/download-ds
JWaters02 Oct 18, 2025
ed79831
fix: implement downloadAllDatasets into FtpMvsApi
JWaters02 Oct 18, 2025
a003177
tests: update command count
JWaters02 Oct 18, 2025
11beac6
tests: all tests passing, ready for Download test cases
JWaters02 Oct 18, 2025
5c15080
tests: data set download functions tests
JWaters02 Oct 18, 2025
efb87ef
tests: uss download functions tests
JWaters02 Oct 19, 2025
e8bce59
tests: add USSUtils.unit.test.ts with coverage for existing & new funcs
JWaters02 Oct 19, 2025
e25d90f
tests: USSInit & DatasetInit coverage
JWaters02 Oct 19, 2025
03fa91e
tests: remove unused imports
JWaters02 Oct 19, 2025
a3de6fd
refactor: add downloadDirectory to IUss interface
JWaters02 Oct 19, 2025
cab987b
tests: add mvs/uss download api impl to ftp ext tests
JWaters02 Oct 19, 2025
5da1f2a
wip: add list opts support to uss dir download
JWaters02 Oct 19, 2025
9bf9a9d
refactor: uss dir download options
JWaters02 Oct 19, 2025
10a1ce7
refactor: handle download responses properly
JWaters02 Oct 20, 2025
6f636e2
Merge branch 'feat/download-uss-dir-opts' into feat/download-ds
JWaters02 Oct 20, 2025
a61fa6f
tests: fix tests and add new tests for the changes
JWaters02 Oct 20, 2025
a44a6ba
refactor: change context menu groupings
JWaters02 Oct 20, 2025
1b06aad
chore: prepublish
JWaters02 Oct 20, 2025
dfd1cef
Merge remote-tracking branch 'origin/main' into feat/download-ds
JWaters02 Dec 3, 2025
a7dec25
tests: dispose of mocked property objects
JWaters02 Dec 3, 2025
e3485ec
tests: fix USSUtils jest failure
JWaters02 Dec 3, 2025
8080e2d
refactor: allow choosing encoding when downloading data sets
JWaters02 Dec 3, 2025
75ac863
tests: cases for choosing encoding for data sets
JWaters02 Dec 3, 2025
2e3b2c0
tests: add not implemented error cases
JWaters02 Dec 3, 2025
51fba05
tests: fix failing DatasetActions tests
JWaters02 Dec 3, 2025
942cd71
Update packages/zowe-explorer/src/trees/dataset/DatasetActions.ts
JWaters02 Dec 3, 2025
47a66ec
refactor: add open file/directory links in download complete notifs
JWaters02 Dec 4, 2025
6054ce9
Merge remote-tracking branch 'JWaters02/feat/download-ds' into feat/d…
JWaters02 Dec 4, 2025
059aacf
chore: ZE API changelog
JWaters02 Dec 4, 2025
901e89f
chore: ftp changelog
JWaters02 Dec 4, 2025
1e8b83d
chore: ZE changelog
JWaters02 Dec 4, 2025
a3df2f6
fix: that uss dir download was not passing in uss list opts into sdk
JWaters02 Dec 4, 2025
84d65f5
fix: add support for record mode on data set download
JWaters02 Dec 4, 2025
ae6089f
tests: fix failing zosmf api test for previous bugfix
JWaters02 Dec 4, 2025
ecb2e62
feat: option to override downloaded file extensions in data set download
JWaters02 Dec 6, 2025
0e135e1
chore: prepublish
JWaters02 Dec 6, 2025
7e0c72a
fix: that uss dir filter opts couldn't be un-applied
JWaters02 Dec 6, 2025
aab7bcf
chore: prepublish
JWaters02 Dec 6, 2025
8db110b
Merge remote-tracking branch 'origin/main' into feat/download-ds
JWaters02 Dec 15, 2025
9b8fd1f
Update packages/zowe-explorer/CHANGELOG.md
JWaters02 Dec 15, 2025
26a967c
fix: suggestions
JWaters02 Dec 15, 2025
ae2b9d1
Merge remote-tracking branch 'JWaters02/feat/download-ds' into feat/d…
JWaters02 Dec 15, 2025
04b3baa
fix: made new extender APIs optional and remove from FTP extension
JWaters02 Dec 17, 2025
4ca56ee
Merge branch 'main' into feat/download-ds
JWaters02 Jan 12, 2026
89c7029
tests: fix from merge
JWaters02 Jan 12, 2026
5de74fa
Merge branch 'main' into feat/download-ds
traeok Jan 16, 2026
c67ec82
Merge branch 'main' into feat/download-ds
zFernand0 Jan 16, 2026
a9b1673
Merge branch 'main' into feat/download-ds
JWaters02 Jan 25, 2026
cfe4d86
fix: address review comments
JWaters02 Jan 25, 2026
c01e313
fix: build issue
JWaters02 Jan 25, 2026
e990225
Merge branch 'main' into feat/download-ds
JillieBeanSim Jan 27, 2026
73f266f
Merge branch 'main' into feat/download-ds
JWaters02 Feb 15, 2026
041e529
refactor: address some comments
JWaters02 Feb 15, 2026
6911be0
refactor: if generate uss dir structure off, download files to dir name
JWaters02 Feb 15, 2026
bc2d665
tests: remove tests for deleted countAllFilesRecursively function
JWaters02 Feb 15, 2026
1a9f3d8
tests: fix failing tests on windows due to path.join making backslashes
JWaters02 Feb 15, 2026
43b43fb
refactor: moved include hidden files & search filesystems to filter opts
JWaters02 Feb 15, 2026
514a78c
refactor: uss dir opts quickpick to use same UX as jobs
JWaters02 Feb 19, 2026
401be7d
fix: that Override File Extension option wasn't being used
JWaters02 Feb 21, 2026
2a6907f
chore: prepublish
JWaters02 Feb 21, 2026
e917cb0
tests: fix failing tests
JWaters02 Feb 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions packages/zowe-explorer-api/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ All notable changes to the "zowe-explorer-api" extension will be documented in t
- Added support for loading credential manager options from the `imperative.json` file. Added a `credentialManagerOptions` object in the JSON object in `imperative.json` to specify options for the current credential manager. [#3935](https://github.com/zowe/zowe-explorer-vscode/pull/3935)
- Added support for custom persistence levels for Windows (persist option) to support the credential manager in less permissive environments. For more information on how to configure this option, see the "Troubleshooting Zowe CLI credentials" on [Zowe Docs](https://docs.zowe.org/stable/troubleshoot/cli/troubleshoot-cli-credentials/#secrets-sdk-persistence-level-for-windows). [#3935](https://github.com/zowe/zowe-explorer-vscode/pull/3935)
- Added a new filesystem helper function named `getApiOrThrowUnavailable` for generalized error handling with API access. When the given API getter fails due to a non-existing profile, an `Unavailable` FileSystemError is thrown with additional context on the encountered error. [#3962](https://github.com/zowe/zowe-explorer-vscode/pull/3962)
- Added support for `downloadDirectory` to the `MainframeInteraction` namespace. `downloadDirectory` is for downloading the contents of a USS directory based on a number of options and filters. [#3843](https://github.com/zowe/zowe-explorer-vscode/pull/3843)
- Added support for `downloadAllMembers` to the `MainframeInteraction` namespace. `downloadAllMembers` is for downloading all members of a PDS based on a number of options. [#3843](https://github.com/zowe/zowe-explorer-vscode/pull/3843)
- Added support for calling `UssApi.fileList` with the `zosfiles.IUSSListOptions` interface, which provides filters for listing USS files. [#3843](https://github.com/zowe/zowe-explorer-vscode/pull/3843)

### Bug fixes

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,12 @@ describe("ZosmfUssApi", () => {
spy: jest.spyOn(zosfiles.Download, "ussFile"),
args: ["ussPath", fakeProperties],
},
{
name: "downloadDirectory",
spy: jest.spyOn(zosfiles.Download, "ussDir"),
args: ["ussDirectoryPath", fakeProperties, undefined],
transform: (args) => [args[0], fakeProperties, args[2]],
},
{
name: "putContent",
spy: jest.spyOn(zosfiles.Upload, "fileToUssFile"),
Expand Down Expand Up @@ -513,6 +519,11 @@ describe("ZosmfMvsApi", () => {
spy: jest.spyOn(zosfiles.Download, "dataSet"),
args: ["dsname", fakeProperties],
},
{
name: "downloadAllMembers",
spy: jest.spyOn(zosfiles.Download, "allMembers"),
args: ["dsname", fakeProperties],
},
{
name: "putContents",
spy: jest.spyOn(zosfiles.Upload, "pathToDataSet"),
Expand Down
26 changes: 25 additions & 1 deletion packages/zowe-explorer-api/src/extend/MainframeInteraction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export namespace MainframeInteraction {
* as well as the list of results in apiResponse.items with
* minimal properties name, mode.
*/
fileList(ussFilePath: string): Promise<zosfiles.IZosFilesResponse>;
fileList(ussFilePath: string, options?: zosfiles.IUSSListOptions): Promise<zosfiles.IZosFilesResponse>;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

brought up in another issue, with adding a new optional parameter should we create a new API and mark the other as deprecated?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm @JillieBeanSim I do not understand why this would be a breaking change or not backwards compatible, as I thought simply making a parameter optional is enough to get by.


/**
* Check th USS chtag to see if a file requires conversion.
Expand All @@ -119,9 +119,24 @@ export namespace MainframeInteraction {
*
* @param {string} ussFilePath
* @param {zosfiles.IDownloadOptions} options
* @returns {Promise<zosfiles.IZosFilesResponse>}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding the return value to the TSDoc. 🙏
It would be nice if all functions were consistently returning the proper Promise<...> value 😅
This is not a request for changes though 😋

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confused on this one. Which ones aren't returning the proper Promise<...> value? Thanks

*/
getContents(ussFilePath: string, options: zosfiles.IDownloadSingleOptions): Promise<zosfiles.IZosFilesResponse>;

/**
* Download a USS directory to the local file system.
*
* @param {string} ussDirectoryPath The path of the USS directory to download
* @param {zosfiles.IDownloadOptions} fileOptions Download options including local directory path
* @param {zosfiles.IUSSListOptions} listOptions Options for listing files in USS
* @returns {Promise<zosfiles.IZosFilesResponse>}
*/
downloadDirectory?(
ussDirectoryPath: string,
fileOptions?: zosfiles.IDownloadOptions,
listOptions?: zosfiles.IUSSListOptions
): Promise<zosfiles.IZosFilesResponse>;

/**
* Uploads a given buffer as the contents of a file on USS.
* @param {Buffer} buffer
Expand Down Expand Up @@ -235,6 +250,15 @@ export namespace MainframeInteraction {
*/
getContents(dataSetName: string, options?: zosfiles.IDownloadSingleOptions): Promise<zosfiles.IZosFilesResponse>;

/**
* Retrieve all members of a partitioned data set and save them to a directory.
*
* @param {string} dataSetName
* @param {zosfiles.IDownloadOptions} [options]
* @returns {Promise<zosfiles.IZosFilesResponse>}
*/
downloadAllMembers?(dataSetName: string, options?: zosfiles.IDownloadOptions): Promise<zosfiles.IZosFilesResponse>;

/**
* Uploads a given buffer as the contents of a file to a data set or member.
*
Expand Down
30 changes: 28 additions & 2 deletions packages/zowe-explorer-api/src/profiles/ZoweExplorerZosmfApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,11 @@ import { IDataSetCount } from "../dataset/IDataSetCount";
* An implementation of the Zowe Explorer USS API interface for zOSMF.
*/
export class UssApi extends CommonApi implements MainframeInteraction.IUss {
public fileList(ussFilePath: string): Promise<zosfiles.IZosFilesResponse> {
return zosfiles.List.fileList(this.getSession(), ussFilePath, { responseTimeout: this.profile?.profile?.responseTimeout });
public fileList(ussFilePath: string, options?: zosfiles.IUSSListOptions): Promise<zosfiles.IZosFilesResponse> {
return zosfiles.List.fileList(this.getSession(), ussFilePath, {
responseTimeout: this.profile?.profile?.responseTimeout,
...options,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would we need to check for existence of options here to avoid issues like seen here or have a new API deprecating the old for adoption of new feature

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the case of the previous issue where the optional parameter was added, the mistake was that they were using it without checking if it was existent or not. In this case however, the zosfiles.List.fileList API also lists options as optional, so if options does not exist, it does not matter as fileList will continue to work as before but without the specific options. So I don't think any check here needs to be done.

});
}

public isFileTagBinOrAscii(ussFilePath: string): Promise<boolean> {
Expand All @@ -129,6 +132,22 @@ import { IDataSetCount } from "../dataset/IDataSetCount";
});
}

public downloadDirectory(
ussDirectoryPath: string,
fileOptions?: zosfiles.IDownloadOptions,
listOptions?: zosfiles.IUSSListOptions
): Promise<zosfiles.IZosFilesResponse> {
return zosfiles.Download.ussDir(
this.getSession(),
ussDirectoryPath,
{
responseTimeout: this.profile?.profile?.responseTimeout,
...fileOptions,
},
listOptions
);
}

public copy(outputPath: string, options?: Omit<object, "request">): Promise<Buffer> {
return zosfiles.Utilities.putUSSPayload(this.getSession(), outputPath, { ...options, request: "copy" });
}
Expand Down Expand Up @@ -260,6 +279,13 @@ import { IDataSetCount } from "../dataset/IDataSetCount";
});
}

public downloadAllMembers(dataSetName: string, options?: zosfiles.IDownloadOptions): Promise<zosfiles.IZosFilesResponse> {
return zosfiles.Download.allMembers(this.getSession(), dataSetName, {
responseTimeout: this.profile?.profile?.responseTimeout,
...options,
});
}

public uploadFromBuffer(buffer: Buffer, dataSetName: string, options?: zosfiles.IUploadOptions): Promise<zosfiles.IZosFilesResponse> {
return zosfiles.Upload.bufferToDataSet(this.getSession(), buffer, dataSetName, {
responseTimeout: this.profile?.profile?.responseTimeout,
Expand Down
6 changes: 5 additions & 1 deletion packages/zowe-explorer-api/src/tree/IZoweTreeNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ interface OtherEncoding {
codepage: string;
}

export type ZosEncoding = TextEncoding | BinaryEncoding | OtherEncoding;
interface AutoDetectEncoding {
kind: "auto-detect";
}

export type ZosEncoding = TextEncoding | BinaryEncoding | OtherEncoding | AutoDetectEncoding;

export type EncodingMap = Record<string, ZosEncoding>;

Expand Down
1 change: 1 addition & 0 deletions packages/zowe-explorer/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ All notable changes to the "vscode-extension-for-zowe" extension will be documen
- Added support for loading credential manager options from the imperative.json file. Add a `credentialManagerOptions` object in the JSON object in `imperative.json` to specify options for the current credential manager. [#3935](https://github.com/zowe/zowe-explorer-vscode/pull/3935)
- Added support for custom persistence levels for Windows (persist option) to support the credential manager in less permissive environments. For more information on how to configure this option, refer to the ["Troubleshooting Zowe CLI credentials"](https://docs.zowe.org/stable/troubleshoot/cli/troubleshoot-cli-credentials/#secrets-sdk-persistence-level-for-windows) page on Zowe Docs. [#3935](https://github.com/zowe/zowe-explorer-vscode/pull/3935)
- Updated minimum VS Code version from 1.79 to 1.90. We are dropping support for VS Code releases that bundle versions of Node.js no longer receiving security updates. [#3684](https://github.com/zowe/zowe-explorer-vscode/issues/3684)
- Added support for downloading data sets, data set members, USS files, and USS directories. [#3843](https://github.com/zowe/zowe-explorer-vscode/pull/3843)

### Bug fixes

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,4 +187,9 @@ export class IZosFilesResponse {
public apiResponse?: any;
}

export class ZosFilesUtils {
public static getDirsFromDataSet = jest.fn().mockReturnValue("test/dataset/path");
public static DEFAULT_FILE_EXTENSION = "txt";
}

export const { Copy } = jest.requireActual("@zowe/zos-files-for-zowe-sdk");
4 changes: 3 additions & 1 deletion packages/zowe-explorer/__tests__/__mocks__/vscode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1651,7 +1651,9 @@ export interface TextDocument {
export class Uri {
private static _regexp = /^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;
public static file(path: string): Uri {
return Uri.parse(path);
const uri = Uri.parse(path);
uri.fsPath = path;
return uri;
}
public static parse(value: string, _strict?: boolean): Uri {
const match = Uri._regexp.exec(value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,9 @@ async function createGlobalMocks() {
"zowe.ds.tableView",
"zowe.ds.listDataSets",
"zowe.ds.setDataSetFilter",
"zowe.ds.downloadAllMembers",
"zowe.ds.downloadMember",
"zowe.ds.downloadDataSet",
"zowe.uss.addSession",
"zowe.uss.refreshAll",
"zowe.uss.refresh",
Expand All @@ -202,6 +205,8 @@ async function createGlobalMocks() {
"zowe.uss.uploadDialog",
"zowe.uss.uploadDialogBinary",
"zowe.uss.uploadDialogWithEncoding",
"zowe.uss.downloadFile",
"zowe.uss.downloadDirectory",
"zowe.uss.copyPath",
"zowe.uss.editFile",
"zowe.uss.editAttributes",
Expand Down
Loading
Loading