File Operations
This study notes covers File Operations within File Handling for GCSE Computer Science. Revise File Handling in 3.2 Programming for GCSE Computer Science with 15 exam-style questions and 10 flashcards. This is a high-frequency topic, so it is worth revising until the explanation feels precise and repeatable. It is section 3 of 7 in this topic. Use this study notes to connect the idea to the wider topic before moving on to questions and flashcards.
Topic position
Section 3 of 7
Practice
15 questions
Recall
10 flashcards
File Operations
| Operation | GCSE Pseudocode | Purpose |
|---|---|---|
| Open for reading | myFile = open("file.txt") | Open file to read data |
| Open for writing | myFile = openWrite("file.txt") | Open file to write (overwrites) |
| Read line | line = myFile.readLine() | Read next line from file |
| Write line | myFile.writeLine("text") | Write a line to file |
| Close file | myFile.close() | Close file when done |
| End of file | myFile.endOfFile() | Check if at end of file |
Keep building this topic
Read this section alongside the surrounding pages in File Handling. That gives you the full topic sequence instead of a single isolated revision point.
Practice Questions for File Handling
Which OCR pseudocode command is used to open a file called 'scores.txt' for reading?
Describe how OCR pseudocode reads all lines from a text file, using a WHILE loop. Include the role of endOfFile() in your answer.
Quick Recall Flashcards
15 questions on File Handling — practise free
Instant marking, adaptive difficulty, and 10 spaced repetition flashcards. Free until your GCSEs.
Try PrepWise Free