Read a file in DriverKit

I am working on a USBDriverKit project and would like to ask if it is possible in driver's code to read a file which is stored outside of the driver bundle?

The reason, why the file has to be stored somewhere else than inside of the driver bundle, is that the file's contents should be written by a client app. Therefore it is not possible to use for reading e.g. OSBundle::loadResource method, as the driver bundle inside the /Library/SystemExtensions directory is not writeable by the client app.

In order to read a file outside of your dext, you will need to do so from an application and communicate that information to the dext via a UserClient. Unfortunately, due to the sandboxing surrounding dexts, accessing files outside of their bundle is not possible at this time. Please file a feedback if you feel like the UserClient option is unacceptable.

Read a file in DriverKit
 
 
Q