java - Convert a FileObject into a File -


i'm using apache commons vfs2 (virtual file system) monitor change file in directory. org.apache.commons.vfs2.filelistener return org.apache.commons.vfs2.fileobject. how convert org.apache.commons.vfs2.fileobject java.io.file

you can use

new file(fileobject.getname().getpath()); 

note vfs file object not necesarrily references real file, can reference file within zip file example. depends on resolver used obtain file object.


Comments

Popular posts from this blog

php - Cakephp Not validating data in Form -

html5 - How to use WYSIWYG editor in Phpfox? -

php - get the current k2 item ID -