Create folders from Xcode 11 playground

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

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"
Create folders from Xcode 11 playground
 
 
Q