OS topic 14 – Files and directories Flashcards
Files
Current operating systems treat files as a collection of a given number of bytes stored on secondary storage.
That is, they don’t concern themselves with the c________ of files – that is the job of the a__________ p____________ through which files are created and used.
contents
application programs
Filenames
Whenever a file is created, it needs to be given an identifying l_______ so that the operating system can keep track of it.
An operating system could do this by giving each file a u_______ number, but people prefer more readable names such as ‘January 2020 expenses’.
label
unique number
Directories
A file system needs to keep a list of the files it contains. Such a list is known as a d________.
It is important to realise that a directory is more than a list of filenames: directories also include some details about those files.
directory
Directories
All the files and subdirectories on one particular disk or other secondary storage device emerge from the master or top-level directory for that device. This is called the r_____ directory.
root
Absolute Path
An absolute path provides the c_______ and e________ location of a file or directory from the root directory of the file system.
complete and exact
Relative Path
A relative path specifies the location of a file or directory in relation to the current working directory.
It does not start from the r_______ directory; instead, it assumes a starting point, usually the directory you are currently in.
root directory
File Types
True or false?
Generally, operating systems treat all files identically: the OS can carry out the fundamental operations create, read, write, rename, delete and copy without caring what the file contains.
True
File Types
There is some information about a file that the OS does need to know.
Give some examples.
The file extension, i.e. if it is a .txt, .jpg”, .exe, etc.
associations, icons, security considerations, default actions, and metadata.
File Types
The OS needs to know about a file’s extension to:
Identify file types. Knowing the file extension helps the OS determine the f______ or structure of the file.
For example, a text file has a different format than an image file, and the OS needs to recognize these distinctions to perform a__________ actions.
format
appropriate
File Types
The OS needs to know about a file’s associations to:
Launch the correct a___________ when a user opens a file.
For instance, if you double-click on a file with a “.docx” extension, the OS needs to know that it’s a_________ with a word processing application (e.g., Microsoft Word) to open and edit the document.
application
associated with
File Types
The OS needs to know about a file’s icons to:
Display an appropriate i_____ for each file, making it easier for users to identify and interact with their files.
icon
File Types
The OS needs to know about a file’s security considerations to:
Enforce a________ c_______ and p__________ accurately.
For example, executable files (.exe) might require specific permissions to run, and the OS must manage these permissions accordingly.
access controls
permissions
File Types
The OS needs to know about a file’s default actions to:
Determine the default actions for each f____, enhancing user convenience and workflow.
file
File Types
The OS needs to know about a file’s metadata to: