Module 01-17 File I/O: Writing Flashcards

1
Q

Method: Does the file or directory exist? (Boolean)

A

exists()

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

Method: Does the path point to a directory? (Boolean)

A

isDirectory()

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

Method: Does the path point to a file? (Boolean)

A

isFile()

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

Method: Returns the name of the file or directory

A

getName()

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

Method: Returns the absolute path of the file or directory

A

getAbsolutePath()

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

Method: Creates a new directory in the specified location

A

mkdir()

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

Method: Creates a new file in the specified location

A

createNewFile()

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