[IronPython] Current working directory in Silverlight?

Michael Foord fuzzyman at voidspace.org.uk
Tue Oct 28 12:03:54 CET 2008

Kenneth Miller wrote:
> All,
>     Trying to execute this code in Silverlight:
> from System.IO import Directory
> Directory.GetCurrentDirectory()

What happens when you execute this code?

>     How do I handle directories in silveright? I know it's a bit 
> different since they're packaged. I need to be able to keep track of a 
> file's location inside the package.

As you don't have a filesystem in Silverlight I doubt it has a concept 
of current working directory - this means that you will probably need to 
track it yourself. Being able to access resources inside the xap file 
using files is just a convenience.

You can also use IsolatedStorage for filesystem like access in browser 


> Thanks for your time.
> Regards,
> Ken
> _______________________________________________
> Users mailing list
> Users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


More information about the Ironpython-users mailing list