This file specifies a small java program contained on a single java source file that can be used to test the jbox tool.
-
The class should be called JBoxTest.
-
When run the program should do the steps that follow in the order provided. Every operation should be done in a try/catch block and if an operation fails (if an exception is throw), detailed information about the operation failing should be printed to stderr. After a failure and with suitable detailed information printed for the failure, the program should continue executing the next step. If an operation is performed successfully, the program should print to stderr what operation it was and that it succeeded.
-
Print to stdout the contents of the "/" directory. Print each file name and each directory name. For directories append a '/' character to the name of the directory.
-
Try to create a new directory "test-dir" under the directory /ro-data.
-
Read the contents of the file "/ro-data/file1" and print it to stdout.
-
Write the string "hello" as UTF-8 bytes to the file "/ro-data/file2"
-
Write the string "hello" as UTF-8 bytes to the file "/rw-data/file3"
-
Print a "done" message to stderr and exit normally, which in a POSIX execution environment should make the process exit with a zero exit status.