protected FTPFile(FileURL fileURL, org.apache.commons.net.ftp.FTPFile file) throws IOException { super(fileURL); this.absPath = fileURL.getPath(); if(file==null) { this.file = getFTPFile(fileURL); // If file doesn't exist (could not be resolved), create it if(this.file==null) { String name = fileURL.getFilename(); // Filename could potentially be null this.file = createFTPFile(name==null?"":name, false); this.fileExists = false; } else { this.fileExists = true; } } else { this.file = file; this.fileExists = true; } this.permissions = new FTPFilePermissions(this.file); }