O'Reilly logo

Clojure Programming Cookbook by Nicolas Modrzyk, Makoto Hashimoto

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Manipulating files and directories

In this recipe, we will show you how to read from files and write to files. Then we will learn how to create, delete, and list files and directories.

Getting ready

This recipe does not make use of any external library, so you can just start a REPL and be ready. As we manipulate files and directories, be careful to not delete files or directories and not overwriting the contents of your important files through inattention. We will make use of the source code of Clojure on the GitHub, so you need to install the git client to obtain the source.

How to do it...

Let's learn how to read and write files. We will also learn how to create and delete files and directories. Then we will see how to list files and directories. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required