1 Reply
      Latest reply on Dec 1, 2019 7:51 AM by eskimo
      TomE Level 1 Level 1 (0 points)

        Hi,

         

        I tried to imeplement some data clustering and separation algorithms with an Xcode playground - however I can't figure out how to create programmatically subfolders in *~/Documents/Shared Playground Data* as FileManager is not availabe in the playground. Any ideas?

         

        Thanks,

             Thomas

        • Re: Create folders from Xcode 11 playground
          eskimo Apple Staff Apple Staff (12,705 points)

          as FileManager is not availabe in the playground.

          Huh?  I can use FileManager in a playground just fine.  Here’s what I did:

          1. In Xcode 11.2 on macOS 10.14.6, I selected New > Playground.

          2. I chose a macOS > Blank playground.

          3. I replaced the code with this:

            import Foundation
            
            
            FileManager.default.homeDirectory(forUser: "quinn")

            .

          4. On running the code, I see the correct URL for my home directory.

          Share and Enjoy

          Quinn “The Eskimo!”
          Apple Developer Relations, Developer Technical Support, Core OS/Hardware
          let myEmail = "eskimo" + "1" + "@apple.com"