@Override protected void processPathArgument(PathData item) throws IOException { // implicitly recurse once for cmdline directories if (dirRecurse && item.stat.isDirectory()) { recursePath(item); } else { super.processPathArgument(item); } }
@Override protected void processPathArgument(PathData src) throws IOException { if (src.stat.isDirectory() && src.fs.equals(dst.fs)) { PathData target = getTargetPath(src); String srcPath = src.fs.makeQualified(src.path).toString(); String dstPath = dst.fs.makeQualified(target.path).toString(); if (dstPath.equals(srcPath)) { PathIOException e = new PathIOException(src.toString(), "are identical"); e.setTargetPath(dstPath.toString()); throw e; } // When a path is normalized, all trailing slashes are removed // except for the root if(!srcPath.endsWith(Path.SEPARATOR)) { srcPath += Path.SEPARATOR; } if(dstPath.startsWith(srcPath)) { PathIOException e = new PathIOException(src.toString(), "is a subdirectory of itself"); e.setTargetPath(target.toString()); throw e; } } super.processPathArgument(src); }
@Override protected void processPathArgument(PathData item) throws IOException { // implicitly recurse once for cmdline directories if (dirRecurse && item.stat.isDirectory()) { recursePath(item); } else { super.processPathArgument(item); } }
@Override protected void processPathArgument(PathData item) throws IOException { // implicitly recurse once for cmdline directories if (dirRecurse && item.stat.isDirectory()) { recursePath(item); } else { super.processPathArgument(item); } }
@Override protected void processPathArgument(PathData item) throws IOException { // implicitly recurse once for cmdline directories if (dirRecurse && item.stat.isDirectory()) { recursePath(item); } else { super.processPathArgument(item); } }
@Override protected void processPathArgument(PathData item) throws IOException { // implicitly recurse once for cmdline directories if (dirRecurse && item.stat.isDirectory()) { recursePath(item); } else { super.processPathArgument(item); } }
@Override protected void processPathArgument(PathData src) throws IOException { if (src.stat.isDirectory() && src.fs.equals(dst.fs)) { PathData target = getTargetPath(src); String srcPath = src.fs.makeQualified(src.path).toString(); String dstPath = dst.fs.makeQualified(target.path).toString(); if (dstPath.equals(srcPath)) { PathIOException e = new PathIOException(src.toString(), "are identical"); e.setTargetPath(dstPath.toString()); throw e; } // When a path is normalized, all trailing slashes are removed // except for the root if(!srcPath.endsWith(Path.SEPARATOR)) { srcPath += Path.SEPARATOR; } if(dstPath.startsWith(srcPath)) { PathIOException e = new PathIOException(src.toString(), "is a subdirectory of itself"); e.setTargetPath(target.toString()); throw e; } } super.processPathArgument(src); }
@Override protected void processPathArgument(PathData src) throws IOException { if (src.stat.isDirectory() && src.fs.equals(dst.fs)) { PathData target = getTargetPath(src); String srcPath = src.fs.makeQualified(src.path).toString(); String dstPath = dst.fs.makeQualified(target.path).toString(); if (dstPath.equals(srcPath)) { PathIOException e = new PathIOException(src.toString(), "are identical"); e.setTargetPath(dstPath.toString()); throw e; } if (dstPath.startsWith(srcPath+Path.SEPARATOR)) { PathIOException e = new PathIOException(src.toString(), "is a subdirectory of itself"); e.setTargetPath(target.toString()); throw e; } } super.processPathArgument(src); }
@Override protected void processPathArgument(PathData src) throws IOException { if (src.stat.isDirectory() && src.fs.equals(dst.fs)) { PathData target = getTargetPath(src); String srcPath = src.fs.makeQualified(src.path).toString(); String dstPath = dst.fs.makeQualified(target.path).toString(); if (dstPath.equals(srcPath)) { PathIOException e = new PathIOException(src.toString(), "are identical"); e.setTargetPath(dstPath.toString()); throw e; } if (dstPath.startsWith(srcPath+Path.SEPARATOR)) { PathIOException e = new PathIOException(src.toString(), "is a subdirectory of itself"); e.setTargetPath(target.toString()); throw e; } } super.processPathArgument(src); }
@Override protected void processPathArgument(PathData src) throws IOException { if (src.stat.isDirectory() && src.fs.equals(dst.fs)) { PathData target = getTargetPath(src); String srcPath = src.fs.makeQualified(src.path).toString(); String dstPath = dst.fs.makeQualified(target.path).toString(); if (dstPath.equals(srcPath)) { PathIOException e = new PathIOException(src.toString(), "are identical"); e.setTargetPath(dstPath.toString()); throw e; } if (dstPath.startsWith(srcPath+Path.SEPARATOR)) { PathIOException e = new PathIOException(src.toString(), "is a subdirectory of itself"); e.setTargetPath(target.toString()); throw e; } } super.processPathArgument(src); }
/** {@inheritDoc} */ @Override protected void processPathArgument(PathData item) throws IOException { if(item.stat.isSymlink() && (getOptions().isFollowArgLink() || getOptions().isFollowLink())) { item = new PathData(item.stat.getSymlink().toString(), getConf()); } super.processPathArgument(item); } /** Gets a named expression from the factory. */