Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SFTP listDirectory returns only 100 files #73

Open
offle opened this issue Oct 17, 2024 · 7 comments
Open

SFTP listDirectory returns only 100 files #73

offle opened this issue Oct 17, 2024 · 7 comments
Assignees

Comments

@offle
Copy link

offle commented Oct 17, 2024

Hi,
the listDirectory method returns only 100 files.

I've tested it with MacOS Sonoma 14.6.1 and iPhone 15 Pro Simulator in XCode. As server I used the Hostmachine (Sonomo 14.6.1) and a Debian 10 system with the same behaviour.

Sorry, maybe it's not a bug but I can't find any option to override this limit.

Thanks :)

@Joannis
Copy link
Member

Joannis commented Oct 18, 2024

I don't know what could cause this, but there's certainly no such limit in Citadel.

@Joannis
Copy link
Member

Joannis commented Oct 20, 2024

Let me know if you run into any ideas on your end

@offle
Copy link
Author

offle commented Oct 20, 2024

Hi, I didn’t find a solution to this. But I think if there’s no such limit in Citadel, the issue can be closed. I will let you know if I will find anything what’s causing this :)

@Joannis
Copy link
Member

Joannis commented Oct 21, 2024

Thank you :) Even if it's not Citadel I'd love to hear the reason you might find.

@Joannis
Copy link
Member

Joannis commented Oct 21, 2024

I'll keep it open for my own recordkeeping

@offle
Copy link
Author

offle commented Oct 23, 2024

Hi, short update. I couldn't firgure out the reason for this behavior. I know it's really dirty, but I helped myself with parsing the stdout of an 'ls' command.

`

        let stdout = try await client.executeCommand("ls \(directory)")        
        let lsOut = utils.byteBufferToString(byteBuffer: stdout) ?? ""
        let files = lsOut.split(separator: "\n")
        let sftp = try await client.openSFTP()
        for file in files {
            if (file == "." || file == "..")  {
                continue
            }
            debugPrint(file.filename)
            ...
        }

`

@Joannis
Copy link
Member

Joannis commented Nov 9, 2024

If anyone else runs into this issue as well, or has any ideas about this - please do reach out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants