Chapter 6. General Library Interfaces — Part 1

In this chapter

  • 6.1 Times and Dates page 166

  • 6.2 Sorting and Searching Functions page 181

  • 6.3 User and Group Names page 195

  • 6.4 Terminals: isatty() page 202

  • 6.5 Suggested Reading page 203

  • 6.6 Summary page 203

  • Exercises page 205

We saw in Chapter 5, “Directories and File Metadata,” page 117, that directly reading a directory returns filenames in the order in which they’re kept in the directory. We also saw that the struct stat contains all the information about a file, except its name. However, some components of that structure are not directly usable; they’re just numeric values.

This chapter presents the rest of the APIs needed to make full use of the struct stat component values. In order, we cover the following ...

Get Linux® Programming by Example 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.