• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Fundamental File Processing Operations
 

Fundamental File Processing Operations

on

  • 5,008 views

 

Statistics

Views

Total Views
5,008
Views on SlideShare
5,004
Embed Views
4

Actions

Likes
0
Downloads
41
Comments
1

1 Embed 4

http://www.slideshare.net 4

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel

11 of 1 previous next

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
  • ahh
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Fundamental File Processing Operations Fundamental File Processing Operations Presentation Transcript

    • Fundamental File Processing Operations Physical files and Logical files Opening files Closing files Reading and Writing Seeking Special Characters in Files
    • Physical Files and Logical Files
      • Physical file
      • A file that actually exists on secondary storage. It is the file as known by the computer operating system and that appears in its file directory.
      • Logical Files
      • The file as seen by the program. The use of logical files allows a program to describe operations to be performed on a file without knowing what actual physical file will be used. The program may then be used to process any one of a number of different files that share the same structure.
      Physical Files and Logical Files
    • Opening Files
      • 2 ways of manipulation of files:
      • Open an existing file
      • Create a new file, deleting any existing contents in the physical file.
    • Closing Files
      • Analogy
      • Telephone line, like hanging up the phone. When you hang up the phone, the phone is available for taking or placing another call; when you close a file, the logical file name or file descriptor is available for use with another file. Closing a file that has been used for output also ensures that everything has been written to the file.
    • Reading and Writing
      • Fundamental to file processing
      • Actions that make file processing an input/output (I/O) operation.
    • Seeking
      • The action of moving directly to a certain position in a file.
      • Requires at least two pieces of information, source file and offset.
      • Source file – the logical file name in which the seek will occur
      • Offset – the number of positions in the file the pointer is to be moved from the start of the file.
    • Special Characters in Files
      • Creating a file structures may encounter some difficulty with extra, unexpected characters that turn up in the files, with characters that disappear, and with numeric counts that are inserted into the files.