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

Add OpenFlags for SFTP file open options #22

Merged
merged 2 commits into from
Nov 30, 2023

Conversation

nathaniel-daniel
Copy link
Contributor

Closes #20

I chose to use bitflags since I didn't really feel strongly between the suggested options and bitflags are simpler to write.

I added the libc crate to provide the bitflag values.

I renamed the flags to be more descriptive, and added an alias for creating a new file since it felt fitting for a high level interface.

I did not add every possible flag from open(2), since I'm fairly certain this subset of flags are the only meaningful ones.

Copy link
Owner

@wez wez left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!
Just need to bump the version and this can be merged!

libssh-rs/src/sftp.rs Show resolved Hide resolved
@wez wez merged commit e57fdc8 into wez:main Nov 30, 2023
6 checks passed
@wez
Copy link
Owner

wez commented Nov 30, 2023

Thank you!

@nathaniel-daniel nathaniel-daniel deleted the sftp-open-flags branch December 2, 2023 01:40
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

Successfully merging this pull request may close these issues.

Add Wrapper for Sftp.open accesstype Parameter
2 participants