Contents.swift 379 B

1234567891011121314151617
  1. /*:
  2. # FileKit
  3. Use this playground to try out FileKit
  4. */
  5. import Cocoa
  6. import FileKit
  7. import XCPlayground
  8. import PlaygroundSupport
  9. extension Path {
  10. static let SharedPlaygroundData = Path(url: playgroundSharedDataDirectory)!
  11. }
  12. let shared = Path.SharedPlaygroundData
  13. let sample = TextFile(path: shared/"filekit_sample.txt")
  14. try? sample.write("Hello there!")
  15. try? sample.read()