View Single Post
  #1   Spotlight this post!  
Unread 24-02-2014, 21:40
Secretspy97 Secretspy97 is offline
Registered User
FRC #1126
Team Role: Programmer
 
Join Date: Oct 2011
Rookie Year: 2009
Location: New York
Posts: 25
Secretspy97 is an unknown quantity at this point
Creating a folder on the cRIO

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!!
__________________
WHAT TIME IS IT?
1126
Reply With Quote