# Playground Sources (Files.swift)

**URL:** <https://forums.kodeco.com/t/playground-sources-files-swift/168924>\
**Category:** macOS by Tutorials\
**Created:** [April 13, 2022, 5:28pm UTC](https://forums.kodeco.com/t/playground-sources-files-swift/168924 "2022-04-13T17:28:41Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jabbott](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/jabbott/32/105896_2.png) [@jabbott](https://forums.kodeco.com/u/jabbott)\
**Post date:** [April 13, 2022, 5:28pm UTC](https://forums.kodeco.com/t/playground-sources-files-swift/168924/1 "2022-04-13T17:28:42Z")

</div>

Super excited to read this book!

If you’re like me and are already completely lost in chapter 1 at:

The **Sources** section of the playground contains **Files.swift** , which holds functions for saving and reading the sample data. Expand the **Sources** section, if it’s not already expanded, and open **Files.swift**.

and can’t find the Files.swift, in Xcode, click on View → Navigators → Show Navigator (or CMD-0 that’s zero).

---

<div class="post-metadata">

**Author:** ![sarah](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/sarah/32/111112_2.png) [@sarah](https://forums.kodeco.com/u/sarah)\
**Post date:** [April 13, 2022, 11:52pm UTC](https://forums.kodeco.com/t/playground-sources-files-swift/168924/2 "2022-04-13T23:52:02Z")

</div>

Hi. I hope you enjoy the book.

Thanks for this clarification. I’ll see if I can add a note to the book.

---

<div class="post-metadata">

**Author:** ![szuke](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/szuke/32/102075_2.png) [@szuke](https://forums.kodeco.com/u/szuke)\
**Post date:** [April 21, 2022, 2:23pm UTC](https://forums.kodeco.com/t/playground-sources-files-swift/168924/3 "2022-04-21T14:23:53Z")

</div>

Congrats on the new book. Here is a minor detail that might help others. I didn’t see the play button, but it was my own fault. The text clearly says to " Save **Files.swift** and return to the playground page." I didn’t return to the playground page, so I didn’t see the play button. User error.

---

<div class="post-metadata">

**Author:** ![sxbsxb](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/sxbsxb/32/105896_2.png) [@sxbsxb](https://forums.kodeco.com/u/sxbsxb)\
**Post date:** [April 22, 2022, 2:59pm UTC](https://forums.kodeco.com/t/playground-sources-files-swift/168924/4 "2022-04-22T14:59:59Z")

</div>

I could not get pbpaste to work. It is possible that the single line in SampleData.json is too big at over 130000 characters. On my iMac, “getconf ARG\_MAX” returns 1048576. What worked for me in Terminal was:

> cd ~/Downloads  
> cat SampleData.json | json\_pp \> SampleData.pretty.json  
> cp SampleData.json SampleData.original.json  
> cp SampleData.pretty.json SampleData.json

Xcode 13.3.1, macOS 12.3.1, iMac 2017. Default shell in terminal: bash (because I have many years with it).

---

<div class="post-metadata">

**Author:** ![sarah](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/sarah/32/111112_2.png) [@sarah](https://forums.kodeco.com/u/sarah)\
**Post date:** [April 22, 2022, 11:03pm UTC](https://forums.kodeco.com/t/playground-sources-files-swift/168924/5 "2022-04-22T23:03:04Z")

</div>

That’s strange. I’ve tested this on `zsh` and `bash` and they both work.  
My `getconf ARG_MAX` also returns 1048576 so it can’t be that.

But your workaround will do the job, so thanks for posting it for anyone else who has the same problem.

---

<div class="post-metadata">

**Author:** ![sxbsxb](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/sxbsxb/32/105896_2.png) [@sxbsxb](https://forums.kodeco.com/u/sxbsxb)\
**Post date:** [April 23, 2022, 2:26pm UTC](https://forums.kodeco.com/t/playground-sources-files-swift/168924/6 "2022-04-23T14:26:04Z")

</div>

After your response, I tracked this down and embarrassingly it is dumb user. I had done the Command-A to select the whole, original JSON file, but neglected the Command-C to put it in the clipboard. pbpaste does work for me if used correctly. Thanks for looking and sorry for wasting your time.
