Lines Matching defs:to

16  * 2 along with this work; if not, write to the Free Software Foundation,
73 * <p>There is support for common file operations similar to
80 * to represent filenames. On all platforms on which JDK is supported,
84 * strings to specify filenames should use "/".
119 * @param text the string to be split
131 * @param l1 the first list of strings to be compared
132 * @param l2 the second list of strings to be compared
156 * Filters a list of strings according to the given regular expression.
158 * @param lines the strings to be filtered
166 * Filters a list of strings according to the given regular expression.
168 * @param lines the strings to be filtered
182 * <p>Similar to the shell "cp" command: {@code cp from to}.
183 * @param from the file to be copied
184 * @param to where to copy the file
187 public void copyFile(String from, String to) throws IOException {
188 copyFile(Paths.get(from), Paths.get(to));
196 * <p>Similar to the shell "cp" command: {@code cp from to}.
197 * @param from the file to be copied
198 * @param to where to copy the file
201 public void copyFile(Path from, Path to) throws IOException {
202 if (Files.isDirectory(to)) {
203 to = to.resolve(from.getFileName());
205 Files.createDirectories(to.getParent());
207 Files.copy(from, to, StandardCopyOption.REPLACE_EXISTING);
214 * <p>Similar to the shell command: {@code mkdir -p paths}.
215 * @param paths the directories to be created
229 * <p>Similar to the shell command: {@code mkdir -p paths}.
230 * @param paths the directories to be created
242 * Any directories to be deleted must be empty.
243 * <p>Similar to the shell command: {@code rm files}.
244 * @param files the files to be deleted
256 * @param root the directory to be cleaned
286 * to that directory. Otherwise, the file will be moved to the destination,
288 * <p>Similar to the shell "mv" command: {@code mv from to}.
289 * @param from the file to be moved
290 * @param to where to move the file
293 public void moveFile(String from, String to) throws IOException {
294 moveFile(Paths.get(from), Paths.get(to));
300 * to that directory. Otherwise, the file will be moved to the destination,
302 * <p>Similar to the shell "mv" command: {@code mv from to}.
303 * @param from the file to be moved
304 * @param to where to move the file
307 public void moveFile(Path from, Path to) throws IOException {
308 if (Files.isDirectory(to)) {
309 to = to.resolve(from.getFileName());
311 Files.createDirectories(to.getParent());
313 Files.move(from, to, StandardCopyOption.REPLACE_EXISTING);
319 * @param path the file to be read
330 * @param path the file to be read
340 * @param path the file to be read
341 * @param encoding the encoding to be used to read the file
351 * @param path the file to be read
352 * @param encoding the encoding to be used to read the file
366 * <p>Similar to the shell "find" command: {@code find paths -name \*.java}.
367 * @param paths the directories in which to search for .java files
377 * <p>Similar to the shell "find" command: {@code find paths -name \*.ext}.
378 * @param fileExtension the extension to search for
379 * @param paths the directories in which to search for files
384 Set<Path> files = new TreeSet<>(); // use TreeSet to force a consistent order
403 * @param path where to write the file
414 * @param path where to write the file
429 * For each file to be written, the filename will be inferred from the
433 * contains "package p; class C { }", the file will be written to
439 * @param contents the contents of the files to be written
474 * It is able to extract the file name from simple source text using
502 * Writes the source code to a file in the current directory.
510 * Writes the source code to a file in a specified directory.
579 * The file manager delegates to a separate file manager for listing and
589 * Maps binary class names to generated content.
595 * and delegates to a default file manager for input files.
603 * and delegates to a specified file manager for input files.
604 * @param fileManager the file manager to be used for input files
621 * Returns the set of names of files that have been written to a given
633 * Returns the content written to a file in a given location,
645 * Returns the content written to a file in a given location,
677 * @param name binary name of the class to be stored in this file object