comparison src/goodjava/io/IoUtils.java @ 1497:f04bfbb08721

link_from
author Franklin Schmidt <fschmidt@gmail.com>
date Fri, 08 May 2020 16:54:30 -0600
parents 91c167099462
children 22e15cf73040
comparison
equal deleted inserted replaced
1496:6c830be6be98 1497:f04bfbb08721
29 } 29 }
30 } 30 }
31 delete(file); 31 delete(file);
32 } 32 }
33 33
34 public static void link(File from,File to) throws IOException { 34 public static void link(File existing,File link) throws IOException {
35 Files.createLink( to.toPath(), from.toPath() ); 35 Files.createLink( link.toPath(), existing.toPath() );
36 }
37
38 public static void symlink(File existing,File link) throws IOException {
39 Files.createSymbolicLink( link.toPath(), existing.toPath() );
36 } 40 }
37 41
38 public static void copyAll(InputStream in,OutputStream out) 42 public static void copyAll(InputStream in,OutputStream out)
39 throws IOException 43 throws IOException
40 { 44 {