File I/O in C# (using C# to read, write, delete, and copy files) A file is a collection of data with a defined name and directory path saved on a disc. A stream is created when a file is opened for reading or writing.