I am trying to create a folder on the cRIO and then save images from the camera in it.
This is what I have so far:
Code:
private FileConnection photoConfig;
private final String photoPath = "file://Data/";
try {
photoConfig = (FileConnection)Connector.open(photoPath);
photoConfig.delete();
} catch (IOException ex) {
ex.printStackTrace();
}
try {
photoConfig.create();
} catch (IOException ex) {
ex.printStackTrace();
}
Whenever I run this I get a error saying "directory can not be created".
Can someone please tell me what I am doing wrong.
Thanks!!