Every open file is associated with an integer (called the file descriptor). This is true on all major operating systems. When you open a file (at the operating system level) the system tells you what the number/descriptor is. When you open the file you give it the filename, but that's the only time you use the filename. All other times you interact with the file, you use the file descriptor. All open files have these. Standard input (aka the keyboard) always has a file descriptor of 0. Standard output (aka the screen) always an fd of 1. Standard error has an fd of 2. If you open a socket, they also have file descriptors. When you open a file on the hard drive...or on a tape drive...or on anything, the file has a file descriptor. However, most programming language mask this with more useful structures to help you manage a file. In C, we use FILE * to open a file. The structure FILE contains the file descriptor within it, and if you know what you're doing, you can get at that directly. Similarly, C++ uses structures (or classes) called things ifstream, ofstream, fstream to manipulate files, and these classes also store the file descriptor in there somewhere. Java uses a whole bunch of things. Scanner PrintWriter PrintStream BufferedReader...etc etc etc. But somewhere in the mess of classes, the file descriptor is in there somewhere. Well, in Swift/iOS, we use FileHandlers.