Secretspy97
24-02-2014, 21:40
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:
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!!
This is what I have so far:
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!!