public static Resource createFromRoot(File rootFile) {
    """
	Creates a file resource from a file, with the root as this file (if it is a directory
	otherwise its parent).
	
	@param rootFile the root file
	@return the resource (points to this file)
    """
    File root = rootFile;
    String path = "/";

    if(!root.isDirectory())
    {
      root = rootFile.getParentFile();
      path = rootFile.getName();
    }

    return create(root, path);
  }
public static Resource createFromRoot(File rootFile)
  {
    File root = rootFile;
    String path = "/";

    if(!root.isDirectory())
    {
      root = rootFile.getParentFile();
      path = rootFile.getName();
    }

    return create(root, path);
  }
public static Resource createFromRoot ( File rootFile ) { File root = rootFile ; String path = "/" ; if ( ! root . isDirectory ( ) ) { root = rootFile . getParentFile ( ) ; path = rootFile . getName ( ) ; } return create ( root , path ) ; }
Creates a file resource from a file, with the root as this file (if it is a directory
otherwise its parent).

@param rootFile the root file
@return the resource (points to this file)
Creates a file resource from a file with the root as this file ( if it is a directory otherwise its parent ) .