serial getDeviceList()


I am trying to figure out how to use vector getDeviceList();
I would like to look at all the available serial ports and pick a specific one. In my case I want to check if it starts with usbserial or usbmodem.

thanks for any advice,

ok i figured it out.

vector<ofSerialDeviceInfo> serialDevices = serial.getDeviceList();  
	string deviceLine;  
	for(int i=0; i<serialDevices.size();i++){  
		deviceLine = serialDevices[i].getDeviceName().c_str();   
		if(deviceLine.substr(0,12) == "tty.usbmodem"){  
			serialID = "/dev/" +deviceLine;  
			 cout<<"arduino serial = "<<serialID<<endl;