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

fsync: support app container jails #280

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mhils
Copy link

@mhils mhils commented Sep 3, 2023

First off, thanks for the fantastic work on go-ios! 😃 🍰 Extending go-ios was super easy after figuring out what I needed with the debug proxy.

I've had a use case where I wanted to read/write files from/to a specific app container jail. Fortunately house_arrest already had everything I needed, and adding an --app switch to the fsync commands was straightforward.

  1. Is accessing app jails for fsync something you folks are interested in supporting?
  2. If yes, where do we want vendContainer to live? I've just copied it over from house_arrest.go to avoid a circular dependency, but I'm happy to do the legwork and move it into something like afc/house_arrest.go and have everything point there.

}
return &Connection{deviceConn: deviceConn}, nil
}

Copy link
Author

Choose a reason for hiding this comment

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

⬇️ all this is simply copied from house_arrest.go

@danielpaulus
Copy link
Owner

@mhils Thanks for this addition to the project!
I took a look at the modules right now and it is indeed a bit messy the way it is.
house_arrest.go just duplicates most code that is already in fsync.go. If you can do this, I would appreciate if you can just move the entire code over to the afc package.
The only thing that should stay in house_arrest.go are is the public interface for compatibility reasons.
So,
New()
Close()
SendFile()
ListFiles()
CloseFile()
should be the only functions to stay but use afc functions.

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.

2 participants