Mapa mental
File Handling Operations
Contenido del mapa
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
Información
- Descripción
- Mapa Mental sobre File Handling Operations, creado por Ethan Laithwaite el 17/09/2017.
- Creado por
- Ethan Laithwaite
- Visitas
- 2
- Valoración