Hi,
we would like to know if there is any API we can use to get a list of all database files on an ObjectDB server.
The ObjectDB explorer has such a feature (File->Open C/S Connection->Browse...).
Thanks for help!
Hi,
we would like to know if there is any API we can use to get a list of all database files on an ObjectDB server.
The ObjectDB explorer has such a feature (File->Open C/S Connection->Browse...).
Thanks for help!
There is an undocumented method, which is indeed in use by the Explorer:
import java.io.File; import com.objectdb.Utilities; ... File root = Utilities.getServerFileSystem( host, port, username, password, false);
This will return the root directory, which then can be explored further using the java.io.File API.
You can also get the File (or directory) of a specific path on the server using:
File root = Utilities.getServerFileSystem( host, port, username, password, path, false);
Hi,
thanks for your quick reply. It works great!