0

リソース (IFile) を Eclipse プロジェクトから別の場所にコピーしようとしています。場所は、IProjectDescription を使用して IProjects を作成するために以前に使用した UNC パスです。ただし、次のコードを使用してリソースをコピーしようとすると、ResourceException が発生します。

IResource[] res = project.members();
for (IResource r : res)  {
    if (r instanceof IFile) {
        IFile file = (IFile) r;
        file.copy("\\example.com\User\Folder\sj\", true, null);
    }
}

例外は次のようになります。

org.eclipse.internal.resources.ResourceException: リソース '/corp.dsd' が存在しません。

誰にもアイデアはありますか?

4

1 に答える 1

0

IFileStore API を使用してみてください。http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/api/org/eclipse/core/filesystem/IFileStore.html

IFile で getLocation を使用して、そのファイルストアを取得できます。

于 2011-03-05T01:25:32.637 に答える