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

How to list directory of share ? #14

Closed
yuchigit opened this issue Oct 16, 2018 · 2 comments
Closed

How to list directory of share ? #14

yuchigit opened this issue Oct 16, 2018 · 2 comments

Comments

@yuchigit
Copy link

I use listShares to list all share directory, but I can't list all sub directory in one share directory.
I use this code, but didn't work.

self.smbClient.connectShare(name: name, completionHandler: { (error) in
                    print("smb2 con \(error)")
                    self.smbClient.contentsOfDirectory(atPath: ".", completionHandler: { (reses, error) in
                        print("smb2 \(reses) \(error)")
                    })
                })
@amosavian
Copy link
Owner

Pass true for recursive parameter. Inside your connectShare handler:

self.smbClient.contentsOfDirectory(atPath: "/", recursive: true) { (reses, error) in
    //
}

@yuchigit
Copy link
Author

It work now, thanks.

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