1
2
3
4
5
6
7
8
9
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 public interface FileSession
22 {
23
24 void begin() throws ResourceManagerException;
25
26 void commit() throws ResourceManagerException;
27
28 void rollback() throws ResourceManagerException;
29
30 FileInputStream openInputStream(File f) throws IOException;
31
32 FileOutputStream openOutputStream(File f, boolean append) throws IOException;
33
34 FileOutputStream openOutputStream(File f) throws IOException;
35
36 boolean mkdir(File f) throws IOException;
37
38 RandomAccessFile openRandomAccess(File f, String mode) throws IOException;
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53 void delete(File f) throws IOException;
54
55 void copy(File source, File dest) throws IOException;
56
57 void rename(File source, File dest) throws IOException;
58
59 }