locked
File permissions in OSX RRS feed

  • Question

  • I am following the book “C# Programming in easy steps to learn how to program in C# on my iMac. I now realise that the text of the book was tested on a Windows machine as some things don’'t work on my mac.
    I have reached the section on “Writing a file” and have included the line “using System.io” after the “using System” line. When I run the program which includes the line “if (File.Exists(path);”, where path was previously declared as “/users/jim/projects” I get the error message "access to the path '/users/jim/projects is denied' " . When I use 'Command + i" to show the folder information it says that I have read and write permission! So why am I being denied?

    I should be most grateful if someone would tell me what I need to change on my iMac in order to read and write to files.
    Friday, October 11, 2019 3:30 PM

All replies

  • I don't know the book so the following may or may not be of assistance, here is the Microsoft documentation on working with files 

    https://docs.microsoft.com/en-us/xamarin/ios/app-fundamentals/file-system


    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    StackOverFlow
    profile for Karen Payne on Stack Exchange

    Friday, October 11, 2019 4:54 PM