Use getInfo() and getFileInfo() functions.