Lesson Notes By Weeks and Term - Senior Secondary School 2

Handling computer files

Class: SSS 2

Term: 2nd Term

Subject: Computer Science

Week 5

Topic: Handling Computer Files

 

A file is abstract; to define a file properly we need to consider the operation that can be performed on the files. There are six basic file operations that can be performed by the OS. The OS can provide system calls to create, write, read, re-position, delete and truncate files. All information in a file is always in binary form or a series of ones and zeros. A document includes any file you have created. It can be a true text document, sound file, graphics, images, or any other type of information the computer can create, store, or size from the internet.

  1. Creating a file: Two steps are necessary to create a
    • Space in the file system must be found for the
    • An entry for the new file must be made in the
  2. Writing a file: To write a file, we make a system call specifying both the name of the file and the information to be written in the The system must keep a write pointer to the location in the file where the next write is to take place.
  3. Deleting a file: To delete a file, we search the directory for the named Having found the associated directory entry, we release all file spaces so that it can be re-used by other files and erase the directory entry.

 

 

File Operations

The basic file operations are:

  • Create – making a new file
  • Delete – removal of a file
  • Retrieve – to find and bring back a file
  • Copy – to reproduce and original piece of work

 

  • View – to see a file in a folder
  • Update – to make changes to a document or design
  • Open – to open an already created file for the purpose of editing
  • Close – to close a file when done with

 

 

ASSESSMENT

  1. Directory which consists of list of files is classified as
    • list directory
    • directory part
    • catalogue
    • disc directory
  2. File which contains list of other file names is known as
    • path file
    • batched file
    • directory
    • path name
  3. Process of organizing data into processed file is classified as
    • deleting a file
    • organizing a file
    • creating a file
    • updating a file
  4. There are basic file operations that can be performed by the OS
    • four
    • six
    • five
    • eight
  5. All information in a file is always in binary This means that they are in a series of
    • ones and zeros
    • ones and twos
    • twos and zeros
    • twos and threes

 

ANSWERS

  1. c
  2. c
  3. c
  4. b
  5. a


© Lesson Notes All Rights Reserved 2023