Working with File Types
I've mentioned file types a couple of times in this chapter, so perhaps it's time to take a closer look at them. A file is an object, so it has various properties, including its name, its size, and the date and time it was created. The extension part of the filename determines another property: the file type. For example, a file with the extension .TXT is a text document, and a file with a .BMP extension is a bitmap.
The file type, in turn, defines which actions you can use with the file. A text document, for example, has two actions: Open, which displays the document in Notepad, and Print, which sends the document to the Windows 98 default printer. (Technically, the Print action opens Notepad, loads the document, selects ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access