/** * Creates an object to wrap the given parameters as fields. The string * used to create the path will be recorded since the Path object does not * return exactly the same string used to initialize it. * @param fs the FileSystem * @param pathString a String of the path * @param stat the FileStatus (may be null if the path doesn't exist) */ private PathData(FileSystem fs, String pathString, FileStatus stat) throws IOException { this.fs = fs; this.uri = stringToUri(pathString); this.path = fs.makeQualified(new Path(uri)); setStat(stat); if (Path.WINDOWS) { inferredSchemeFromPath = checkIfSchemeInferredFromPath(pathString); } }
/** * Updates the paths's file status * @return the updated FileStatus * @throws IOException if anything goes wrong... */ public FileStatus refreshStatus() throws IOException { FileStatus status = null; try { status = lookupStat(fs, toString(), false); } finally { // always set the status. the caller must get the correct result // if it catches the exception and later interrogates the status setStat(status); } return status; }
/** * Creates an object to wrap the given parameters as fields. The string * used to create the path will be recorded since the Path object does not * return exactly the same string used to initialize it. * @param fs the FileSystem * @param pathString a String of the path * @param stat the FileStatus (may be null if the path doesn't exist) */ private PathData(FileSystem fs, String pathString, FileStatus stat) throws IOException { this.fs = fs; this.uri = stringToUri(pathString); this.path = fs.makeQualified(new Path(uri)); setStat(stat); if (Path.WINDOWS) { inferredSchemeFromPath = checkIfSchemeInferredFromPath(pathString); } }
/** * Creates an object to wrap the given parameters as fields. The string * used to create the path will be recorded since the Path object does not * return exactly the same string used to initialize it. * @param fs the FileSystem * @param pathString a String of the path * @param stat the FileStatus (may be null if the path doesn't exist) */ private PathData(FileSystem fs, String pathString, FileStatus stat) throws IOException { this.fs = fs; this.uri = stringToUri(pathString); this.path = fs.makeQualified(new Path(uri)); setStat(stat); if (Path.WINDOWS) { inferredSchemeFromPath = checkIfSchemeInferredFromPath(pathString); } }
/** * Creates an object to wrap the given parameters as fields. The string * used to create the path will be recorded since the Path object does not * return exactly the same string used to initialize it. * @param fs the FileSystem * @param pathString a String of the path * @param stat the FileStatus (may be null if the path doesn't exist) */ private PathData(FileSystem fs, String pathString, FileStatus stat) throws IOException { this.fs = fs; this.uri = stringToUri(pathString); this.path = fs.makeQualified(new Path(uri)); setStat(stat); if (Path.WINDOWS) { inferredSchemeFromPath = checkIfSchemeInferredFromPath(pathString); } }
/** * Creates an object to wrap the given parameters as fields. The string * used to create the path will be recorded since the Path object does not * return exactly the same string used to initialize it. * @param fs the FileSystem * @param pathString a String of the path * @param stat the FileStatus (may be null if the path doesn't exist) */ private PathData(FileSystem fs, String pathString, FileStatus stat) throws IOException { this.fs = fs; this.uri = stringToUri(pathString); this.path = fs.makeQualified(new Path(uri)); setStat(stat); if (Path.WINDOWS) { inferredSchemeFromPath = checkIfSchemeInferredFromPath(pathString); } }
/** * Updates the paths's file status * @return the updated FileStatus * @throws IOException if anything goes wrong... */ public FileStatus refreshStatus() throws IOException { FileStatus status = null; try { status = lookupStat(fs, toString(), false); } finally { // always set the status. the caller must get the correct result // if it catches the exception and later interrogates the status setStat(status); } return status; }
/** * Updates the paths's file status * @return the updated FileStatus * @throws IOException if anything goes wrong... */ public FileStatus refreshStatus() throws IOException { FileStatus status = null; try { status = lookupStat(fs, toString(), false); } finally { // always set the status. the caller must get the correct result // if it catches the exception and later interrogates the status setStat(status); } return status; }
/** * Updates the paths's file status * @return the updated FileStatus * @throws IOException if anything goes wrong... */ public FileStatus refreshStatus() throws IOException { FileStatus status = null; try { status = lookupStat(fs, toString(), false); } finally { // always set the status. the caller must get the correct result // if it catches the exception and later interrogates the status setStat(status); } return status; }
/** * Updates the paths's file status * @return the updated FileStatus * @throws IOException if anything goes wrong... */ public FileStatus refreshStatus() throws IOException { FileStatus status = null; try { status = lookupStat(fs, toString(), false); } finally { // always set the status. the caller must get the correct result // if it catches the exception and later interrogates the status setStat(status); } return status; }