Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Lectures_SSD2_Yermakova / Lectures_SSD2 Yermakova.doc
Скачиваний:
226
Добавлен:
25.02.2016
Размер:
3.16 Mб
Скачать

3.4.1 File Organization

  • Files

  • Folders

  • Drives

  • Paths

  • Shortcuts

  • File Names and Types

One of the main things computers are used for is storing and retrieving information. The information is stored in one or more "files," which in turn are organized into "folders." The Microsoft Windows file system supports four kinds of entities: files, folders, drives, and shortcuts. The figure below illustrates how files are organized from the perspective of a Windows operating system user.

Figure 1 File organization in a Windows operating system

Files

Each file contains some data. When a file is associated with a particular application, such as Microsoft Word, Excel, or Power Point, it is often called a document. Every file has a name. In Windows, file names can be up to 255 characters long and can contain letters, numbers, and certain special characters, including spaces. Although Windows allows use of both uppercase and lowercase letters in a file name, the distinction is ignored by the file system. Thus if you create a file namedFriends, you can also access it as friends or FRIENDS or even fRiEnDs. Other operating systems, such as Unix/Linux, are sensitive to capitalization. In these operating systems, the files Friends.txt and friends.txt are different.

Every file also has a set of properties associated with it. The most important property is the file type, which indicates to the operating system what application to use to open the file. Other properties include the size of the file, the date and time the file was created, and the date and time the file was last modified. You can view a file's properties by clicking with the right mouse button the file icon and selecting Properties on the pop-up menu. If you have access to a Windows machine, try this now. Another way to see file types and sizes is to go to the View menu in the Folder window and click Details.

Folders

Files reside in folders, which are sometimes called directories. Folders have names and properties too. And, like files, every folder has a residency: it is located in another folder called its parent. This gives the file system a hierarchical structure, like a family tree. That is where the term "parent" comes from. Another good analogy is a company organization chart, where every employee has a boss above him, except for the president at the top. The top of the folder hierarchy is called the root.

The file system will not permit two items in a folder to have the same name. You can verify this by creating two files in your working folder called file1 and file2. If you then try to change the name of file2 to file1, you will get an error message, and the change will not be completed. In the diagram above, there are two files named sales.xls, but they are in different folders.

Drives

Folders are housed in the computer drive. A computer can have many drives, drive A, drive C, drive D, drive E, etc. One way to access the drives is by double-clicking on the icon named "My Computer" on your Desktop. This icon is normally located in the upper-left corner of the Desktop. After you double-clicked on the My Computer icon, you will see that each drive is labeled by an icon that indicates the type of medium the drive uses. For example, the hard drive icon is a picture of a hard drive, and the optical drive icon is a picture of a CD-ROM. Clicking a drive's icon will take you to the root directory of that drive.

Paths

Since items in different folders can have the same name and folders can be nested within other folders, we need a way to instruct the operating system or an application exactly which object (that is, which file or folder) we are referring to. We can do this by specifying the complete path to the object, from the root directory. The first sales file in the diagram above can be reached via the path C:\Dave\1998\sales.xls. As you can see, a path contains a drive designator and a sequence of folder names separated by backslashes—and then, if we are referring to a file, the name of the file itself. The path to the root directory on this drive is written C:\ . You can get Windows to display the full path in the title bar of a folder window by going to the View menu and selecting Options. Then go to theView tab and select the check box labeled Display full paths in the title bar.