单项选择题

Java对文件类提供了许多操作方法,能获得文件对象父路径名的方法是______。

A.getAbsolutePath()
B.getParentFile()
C.getAbsolluteFile()
D.getName()