public static String relativePath(final File root, FilePath path) {
return relativePath(root, path.getIOFile());
}
public static String relativePath(final File root, VirtualFile file) {
return relativePath(root, VfsUtil.virtualToIoFile(file));
<BUG>}
public static String relativePath(final File root, File path) {</BUG>
String rc = FileUtil.getRelativePath(root, path);
if (rc == null) {
throw new IllegalArgumentException("The file " + path + " cannot be made relative to " + root);

public static String relativePath(final File root, FilePath path) {
return relativePath(root, path.getIOFile());
}
public static String relativePath(final File root, VirtualFile file) {
return relativePath(root, VfsUtil.virtualToIoFile(file));
}
public static String relativePath(final VirtualFile root, VirtualFile file) {
return relativePath(VfsUtil.virtualToIoFile(root), VfsUtil.virtualToIoFile(file));
}
public static String relativePath(final File root, File path) {
String rc = FileUtil.getRelativePath(root, path);
if (rc == null) {
throw new IllegalArgumentException("The file " + path + " cannot be made relative to " + root);
