|
use case for fileengine Introductionhere are cases for FileSystemConnection DetailsAdd your content here. Format your content with: 1 singele user1.1FileSystemConnection.addFile("file1",content1);
FileSystemConnection.addFile("file12",content2);
FileSystemConnection.commit();both files are saved successfully 1.2FileSystemConnection.addFile("file1",content1);
FileSystemConnection.addFile("file12",content2);
FileSystemConnection.rollback();both files are not saved 1.3FileSystemConnection.addFile("c:/temp/file1",content1);
FileSystemConnection.addFile("c:/temp/file2",content2);
String[] files = FileSystemConnection.listFiles("c:/temp/")
System.out.println(new String(FileSystemConnection.getContent(files[0])));
FileSystemConnection.rollback();both files are not saved and content1 is displayed on the console 1.4FileSystemConnection.addFile("file1",content1);
FileSystemConnection.removeFile("file11");
FileSystemConnection.rollback();//or commitfile1 are not saved 2 concurrent user2.1conn1.addFile("file1",content1);
conn2.addFile("file1",content1);conn2 is locked until conn1.commit() or conn1.rollback(); 2.2conn1.removeFile("file1",content1);
conn2.removeFile("file1",content1);conn2 is locked until conn1.commit() or conn1.rollback(); 2.2conn1.getContent("file1");
conn2.removeFile("file1",content1);
conn2.commit();
file's read successfully and file1 are removed with noblock
|