fileobject.directory and fileobject.folder is deprecated