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
22
23
24
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
45
46
47
48
49
50
51
52
53
54
55
56
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 }