单项选择题

从键盘上输入一个字符串创建文件对象,若要判断该文件对象为目录文件或数据文件,可使用下列哪个方法?()

A.getPath
B.getName
C.isFile
D.isAbsolute