Working with Files

Red is very well equipped to work with and manipulate files and folders easily.

As early as Chapter 3, Using Words, Values, and Types, we saw our first examples of the file! type, with its % and / syntax. From the type hierarchy, we can observe that file! is a subtype of string!, and, from there, a subtype of series!, and so all the functions we have seen for series also apply to files.

We'll encounter such examples in this chapter. But, above all, we will learn how to use files as data stores. We will examine reading and writing files, either data files, or code files. We'll develop our knowledge of the topic using an ongoing example. By the end of this chapter, you will know how to download stock quotes or other files ...

Get Learn Red - Fundamentals of Red now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.