-
Notifications
You must be signed in to change notification settings - Fork 11
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
如何hook namespace里的api #2
Comments
fileIo.openSync 属性不可改,无法直接修改。 可结合plugin方式修改(参考掘金文章:https://juejin.cn/post/7403261114762543154?searchId=20241224143855132D1C6C1BA6B8234D7E) |
总结来说就是:我需要修改openSync的第一个运行时参数,把它改为我定义的路径,仅此而已(不影响它下边的代码执行);但是呢,由于File不是export的,导致替换方法的返回值无法定义 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
`
let file = fileIo.openSync(context.cacheDir+'/test.txt',fileIo.OpenMode.CREATE|fileIo.OpenMode.WRITE_ONLY)
`
如上代码,我想要hook fileIo的openSync、writeSync,如何实现呢?
fileIo为命名空间
The text was updated successfully, but these errors were encountered: