1 19 20 package org.netbeans.modules.subversion; 21 22 import java.io.*; 23 import java.util.*; 24 import org.netbeans.modules.subversion.util.*; 25 26 31 public class SvnMetadata { 32 33 34 private File storage; 35 36 private SvnMetadata() throws IOException { 37 storage = FileUtils.createTmpFolder("nb_SvnMetadata_"); } 40 41 44 public static SvnMetadata read(File dir) throws IOException { 45 assert dir.isDirectory(); 46 47 SvnMetadata data = new SvnMetadata(); 48 data.load(dir); 50 return data; 51 } 52 53 private void load(File dir) throws IOException { 54 FileUtils.copyDirFiles(dir, storage, true); 55 } 56 57 62 public void save(File dir) throws IOException { 63 dir.mkdirs(); 65 FileUtils.copyDirFiles(storage, dir, true); 66 } 67 68 } 69 | Popular Tags |