0
如何裝飾一些遠程文件系統,如在java目錄中的路徑? 例如是這樣的:虛擬文件系統映射到本地文件
File decoratorFileSystem = new File("ftp://host/path"); // this does not work of course
...
File file1 = new File(decoratorFileSystem, "somefile1");
File file2 = new File(decoratorFileSystem, "somefile2");
所以當我將使用file1
,file2
或其他裝飾的文件,我從裝飾文件系統訪問遠程文件,好像與對應限制它的本地文件。
我想用虛擬文件系統從「org.apache.commons.vfs2.provider ......」但我不知道這是正確的方式...