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

Return Output/Error as String? #18

Open
TheRealPSV opened this issue Mar 6, 2020 · 2 comments
Open

Return Output/Error as String? #18

TheRealPSV opened this issue Mar 6, 2020 · 2 comments

Comments

@TheRealPSV
Copy link

Is there a way to get the output or error message as a String I can use in the application?
For example if I want to get the list of files inside the archive, using the below command, is there a way to get the list that is output?
7z l archive.zip
Right now the command just returns the error code Int, with no command output.

@huzongyao
Copy link
Collaborator

I don't if i can get the output, but I think may be you can modify the std::<<cout part to get the stream

@TheRealPSV
Copy link
Author

TheRealPSV commented Mar 7, 2020

Thanks for the response!

One other question, is it possible to pass a file into 7z directly, instead of typing a command? Like could I pass in a file descriptor, like in this StackOverflow post?

With newer versions of Android it's not possible to just send a path to the library, since we have to use the StorageAccessFramework to access files. If I try to access a file with this lib on Android Q, it returns an error about not having permissions.

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