Lines Matching defs:source

4  * Redistribution and use in source and binary forms, with or without
8 * - Redistributions of source code must retain the above copyright
33 * This source code is provided to illustrate the usage of a given feature
63 * Copy source file to target location. If {@code prompt} is true then
67 static void copyFile(Path source, Path target, boolean prompt, boolean preserve) {
73 Files.copy(source, target, options);
75 System.err.format("Unable to copy: %s: %s%n", source, x);
84 private final Path source;
89 TreeCopier(Path source, Path target, boolean prompt, boolean preserve) {
90 this.source = source;
103 Path newdir = target.resolve(source.relativize(dir));
117 copyFile(file, target.resolve(source.relativize(file)),
126 Path newdir = target.resolve(source.relativize(dir));
149 System.err.println("java Copy [-ip] source... target");
150 System.err.println("java Copy -r [-ip] source-dir... target");
179 // remaining arguments are the source files(s) and the target location
183 Path[] source = new Path[remaining-1];
186 source[i++] = Paths.get(args[argi++]);
194 // copy each source file/directory to target
195 for (i=0; i<source.length; i++) {
196 Path dest = (isDir) ? target.resolve(source[i].getFileName()) : target;
201 TreeCopier tc = new TreeCopier(source[i], dest, prompt, preserve);
202 Files.walkFileTree(source[i], opts, Integer.MAX_VALUE, tc);
204 // not recursive so source must not be a directory
205 if (Files.isDirectory(source[i])) {
206 System.err.format("%s: is a directory%n", source[i]);
209 copyFile(source[i], dest, prompt, preserve);