cancel
Showing results for 
Search instead for 
Did you mean: 

Get Content Information (FTP) returns undefined for nested SFTP paths

08-12-2026 9:29 PM
akshat_03104 Discoverer
137 views 1 comments
0 Likes
SAP Managed Tags
Subscribe

Hi all,

I'm running into a consistent, reproducible issue with the `Get Content Information (FTP)` activity (`irpa_core.ftp.getContentInformation()`) when used over SFTP. It works fine for root-level paths but silently fails for any nested path.

Environment

  • SAP Build Process Automation
  • Protocol: SFTP
  • Tested on two independent servers: a self-hosted `SFTPGo` instance, and the public test server `test.rebex.net`. Same result on both, so this isn't server specific.

Issue

`getContentInformation()` returns the expected object for root-level files/folders, but returns `undefined` (no exception, no error) for any nested (multi-segment) path; whether it's a file or a folder, and regardless of path syntax (`./path`, `/path`, `path`, trailing slash, backslash, case variants, all tested).

Repro steps

await irpa_core.ftp.access("test.rebex.net", "demo", "password", 22, irpa_core.enums.typeFtp.sftp);

const rootInfo = await irpa_core.ftp.getContentInformation('pub'); // works fine
const nestedInfo = await irpa_core.ftp.getContentInformation('pub/example'); // undefined
const nestedFile = await irpa_core.ftp.getContentInformation('pub/example/readme.txt'); // undefined

irpa_core.ftp.close();

Results table

Path

Depth

Exists?

Result

pub1Yes (folder)Full Object
readme.txt1Yes (file)Full Object
pub/example2Yes (folder)undefined
pub/example/readme.txt2Yes (file)undefined
pub/example/doesnotexist.txt2No_xstat: No such file: pub/example/doesnotexist.txt

Why I think this points to a specific root cause

The invalid nested path (`doesnotexist.txt`) correctly throws `_xstat: No such file: ...`. This proves the path is being built and sent to the server correctly, and the server-side stat call runs fine. So the failure isn't in path resolution; it looks like when the remote `stat` call for a nested path *succeeds*, the client fails to parse/return that response and resolves `undefined` instead.

Documentation note

SAP's own docs use a nested path in the sample code:

const ftpContentInfo = await irpa_core.ftp.getContentInformation('./dir/folder1/text1.txt');


This exact pattern fails identically in my testing, so it doesn't seem to be a usage mistake on my end.

 

Has anyone else seen this? Is there a supported way to get file info for a nested path over SFTP, or is the download-then-check-locally approach the expected workaround right now? Or worse, am I doing something obviously wrong?

Thanks!

0 Likes

Accepted Solutions (0)

Answers (0)