Mindmap
File Handling Operations
Inhalt der Mindmap
File Handling Operations
Open
- Prepare the file
- r Read only
- W Write only
- a Append
- r+ or w+ Both read and write
Close
- Close the file
- Important because the open file uses memory
- Gives the file a file handle then immediately closes it
Write
- Allows the program to write to the file
- If the file doesn't exist, it will be created
- If it does exist, all data will be erased ready for the program to write to it
Write loop
- Used instead of repeating the write command again and again
- More efficient
Read
- Converts the entire contents into a single string or array variable
- The program can then search it to find the data it wants.
- Converts the entire contents into a single string or array variable
Read loop
- An iteration loop (FOR or WHILE) can be used to read a file
- The entire data can be read or only some
Informationen
- Beschreibung
- Mindmap am File Handling Operations, erstellt von Ethan Laithwaite am 17/09/2017.
- Erstellt von
- Ethan Laithwaite
- Aufrufe
- 2
- Bewertung