You need to subclass the PlatformAdaptationLayer class and implement file system calls. IronPython will then switch to PAL to do I / O for files. This also assumes a ScriptHost implementation that returns a type for PAL. A good example of this is the Silverlight host, which redirects file I / O to a XAP file.
If you are viewing IronPython's source on IronPython.CodePlex.com, you will find the Silverlight host in IronPython_Main \ Hosts \ Silverlight \ Microsoft.Scripting.Silverlight.
source
share