Skip to content

如何hook namespace里的api #2

@MarsToken

Description

@MarsToken

`

let file = fileIo.openSync(context.cacheDir+'/test.txt',fileIo.OpenMode.CREATE|fileIo.OpenMode.WRITE_ONLY)

fileIo.writeSync(file.fd,'写入的测试文本')

fileIo.closeSync(file.fd)

`
如上代码,我想要hook fileIo的openSync、writeSync,如何实现呢?
fileIo为命名空间

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions