File Commands Flashcards

1
Q

close

A

Closes the file

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

read

A

Reads the content of the file. You can assign the result to a variable.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

readline

A

Reads just one line of a text file

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

truncate

A

Empties the file.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

write(‘stuff’)

A

Writes ‘stuff’ to the file.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

seek(0)

A

Move the read/write head to the beginning of the file

How well did you know this?
1
Not at all
2
3
4
5
Perfectly