Commands (methods/fuctions) Flashcards
1
Q
Close
A
Closes the file. Like file->save in your editor
2
Q
read
A
Reads the contents of a file. You can assign the result to a variable
3
Q
readline
A
Reads just one line of a text file.
4
Q
truncate
A
Empties the file. Watch out if you care about the file.
5
Q
write “stuff”
A
Wights “stuff” to the file.
6
Q
seek (0)
A
Move the read/write location to the beginning of the file.