Bug 81603 [Import/Export] tar import/export does not preserve file permissions
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/wizards/datatransfer/ImportOperation.java
}
    /**
     * Returns the resource either casted to or adapted to an IFolder. 
     * 
     * @param resource resource to cast/adapt
     * @return the resource either casted to or adapted to an IFolder.
     * 	<code>null</code> if the resource does not adapt to IFolder 
     */
    IFolder getFolder(IResource resource) {
        if (resource instanceof IFolder) {
            return (IFolder) resource;
        }
        Object adapted = ((IAdaptable) resource).getAdapter(IFolder.class);
        if(adapted == null)
        	return null;
        return (IFolder) adapted;
    }
    /**
     * Returns the rejected files based on the given multi status.
     *  
     * @param multiStatus multi status to use to determine file rejection
     * @param files source files
     * @return list of rejected files as absolute paths. Object type IPath.
     */
    ArrayList getRejectedFiles(IStatus multiStatus, IFile[] files) {
        ArrayList filteredFiles = new ArrayList();
        IStatus[] status = multiStatus.getChildren();
        for (int i = 0; i < status.length; i++) {
            if (status[i].isOK() == false) {