From the course: Learning Julia
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Using the filesystem
- [Instructor] In this example we're going to see how to work with the file system. Julia provides a full set of functions and features for working with the file system. You can create and delete files, read and write data, and work with directories. So let's open the files_start. Let's try some of these out. So for our first couple of examples, let's look at some simple directory operations. To get the current working directory we can use the pwd function. So I'll just print out the results of calling pwd. And we can also read the contents of the current directory by using the readdir function. So let's just try that out. All right let's go ahead and try running that. So I'll jump over to the terminal and I'll just run this code. And there we can see that here's the current working directory. It's chapter six of the example files. And here is a collection of all the contents in that directory. All right so now let's try working with some individual files. So we'll comment that. So…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.