This study notes covers File Operations within File Handling for GCSE Computer Science. Revise File Handling in Programming for GCSE Computer Science with 15 exam-style questions and 10 flashcards. This topic appears regularly enough that it should still be part of a steady revision cycle. It is section 3 of 6 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 6
Practice
15 questions
Recall
10 flashcards
File Operations
| Operation | OCR 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 |