Local files in current directory issue

There is an interesting behaviour of Workbooks.
Well I just wanted to create file as an input to the .NET code that would follow, but I stumbled into the following behaviour around CurrentDirectory. (on Mac OS X)
* You can easily check current folder with Environment.CurrentDirectory in Workbook
* If you open Xamarin Inspector from the Dock - your current folder is deep in the ~/Library and not writeable
* If you open a .workbook file your current folder changes to the folder where the workbook is located
* But if you open any other .workbook file... it changes again... for all workbooks at the same time

So having multiple workbooks open and working with files might result in unexpected behaviour.
Xamarin, do you think it is work addressing?



  • SandyArmstrongSandyArmstrong USXamarin Team, Insider Xamurai

    It's not really changing for all workbooks...it's changing for all workbooks of the same type, because you can have multiple workbooks all hooked up to the same agent app, and Environment.CurrentDirectory is being set within the agent app.

    Perhaps we should make this change as you switch between your workbooks.

  • IvanKirkorau.3935IvanKirkorau.3935 CNUniversity ✭✭

    Well, it doesn't mean anything within Android anyway... as it points for some local place on a "device".
    But for .NET profile it might get confusing.

    I set the working folder directly when I need it. And it is not an issue for me as I understand what is going on, but it might become an issue to others.

    Maybe you put some note into documentation about working with local files and etc...

  • SandyArmstrongSandyArmstrong USXamarin Team, Insider Xamurai

    Soon we'll be adding full support for local resources. The current directory thing is just a convenience until we do it right.

    Android won't be left out in the cold forever. :-)

Sign In or Register to comment.