[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform] workspace.findFilesForLocation ?

I need to find files by filename, eg given "foo.java" I want all files in the workspace that have <path>/foo.java.

This looks hopeful:
public IFile[] findFilesForLocation(IPath location)

Returns the handles of all files that are mapped to the given path in the local file system. Returns an empty array if there are none. The path should be absolute; a relative path will be treated as absolute. The path segments need not be valid names. The resulting files may not currently exist.

But it does not work, and the phrase "relative path will be treated as absolute" is not at all helpful. What does that mean? "Apples will be treated as oranges": do I get orange juice or apple juice?

If this function does not lookup files like I want, can anyone suggest a function that might to it? Otherwise I have to sweep the workstation for file names and create/maintain a table I guess.

Thanks,
John.