1 10 11 package org.mule.util.file; 12 13 import org.mule.util.xa.ResourceManagerException; 14 15 import java.io.File ; 16 import java.io.FileInputStream ; 17 import java.io.FileOutputStream ; 18 import java.io.IOException ; 19 import java.io.RandomAccessFile ; 20 21 25 public interface FileSession 26 { 27 28 void begin() throws ResourceManagerException; 29 30 void commit() throws ResourceManagerException; 31 32 void rollback() throws ResourceManagerException; 33 34 FileInputStream openInputStream(File f) throws IOException ; 35 36 FileOutputStream openOutputStream(File f, boolean append) throws IOException ; 37 38 FileOutputStream openOutputStream(File f) throws IOException ; 39 40 boolean mkdir(File f) throws IOException ; 41 42 RandomAccessFile openRandomAccess(File f, String mode) throws IOException ; 43 44 57 void delete(File f) throws IOException ; 58 59 void copy(File source, File dest) throws IOException ; 60 61 void rename(File source, File dest) throws IOException ; 62 63 } 64 | Popular Tags |