Code example for File

Methods: getParent

0
        String prefix = "file://";
 
        if (path.startsWith(prefix)) {
            file = new File(path.substring(prefix.length()));
        } else { 
            file = new File(path);
        } 
 
        if (file.getParent() == null) {
            throw new FileNotFoundException();
        } 
 
        return file;
    } 
 
    /** 
     * Abort an ongoing upload or download. 
     */ 
    private void abort(String objectId) {
        final RequestContext context;
        synchronized (activeRequests) {