std.stdio.File struct

This lesson teaches how to use the file struct from the std.stdio module.

The std.file module #

The std.file module contains functions and types that are useful when working with the contents of directories. For example, exists can be used to determine whether a file or a directory exists on the file system. It takes a string as an argument, which specifies the name of the file.

import std.file; // ...
  if (exists(fileName)) {
      // there is a file or
...
Access this course and 1400+ top-rated courses and projects.