# What is the best way to work with the file system?

**URL:** <https://forums.swift.org/t/what-is-the-best-way-to-work-with-the-file-system/71020>\
**Category:** Using Swift\
**Created:** [April 1, 2024, 7:32pm UTC](https://forums.swift.org/t/what-is-the-best-way-to-work-with-the-file-system/71020 "2024-04-01T19:32:01Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![eskimo](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/eskimo/32/13558_2.png) [@eskimo](https://forums.swift.org/u/eskimo)\
**Post date:** [April 2, 2024, 9:42am UTC](https://forums.swift.org/t/what-is-the-best-way-to-work-with-the-file-system/71020/3 "2024-04-02T09:42:33Z")

</div>

> even though I thought URLs were designed for networks

They were? AFAICT `file:` URLs have [been around](https://datatracker.ietf.org/doc/html/rfc1738) as long as `http:` URLs.

Anyway, if you’re curious as to _why_ Foundation works this way, see [my explanation here](https://forums.swift.org/t/get-folders-number-of-elements/30674/12).

Which isn’t to say that everything is peachy when it comes to file system APIs in Swift. As you’ve noted, there’s a lot of room for improvement.

Share and Enjoy

Quinn “The Eskimo!” @ DTS @ Apple

---

_[View the full topic](https://forums.swift.org/t/what-is-the-best-way-to-work-with-the-file-system/71020)._
