listFiles not working

mzainuddin
Posts: 14
Joined: Sat Jan 31, 2015 11:35 pm

listFiles not working

Post by mzainuddin » Wed Oct 25, 2017 1:50 am

Hi, I have the following code snippet regarding listFiles. It does not populate 'list' even though it does call it as successful. Kindly advise if I am doing something wrong or if there is something else wrong.

Code: Select all

//global variable to test code
string list = "123";

void $PRS Delete$ () 
{
	int ID = 0;
	DBG.Write("Started Deleting...");
   	if(list == "123")
	{
		listFiles(list,EventIDs.PRS_Delete);
		return;
	}
       // more code omitted
}
1.) Version of Configuration Tool being used: Build 2.9.20040 (7/19/2017)
2.) Model Number of Unit, PV750, Pv450, etc: PV1200
3.) Operating System: Win 8 64 bit
boyce
Enovation Controls Development
Enovation Controls Development
Posts: 322
Joined: Wed Sep 08, 2010 5:09 pm

Re: listFiles not working

Post by boyce » Wed Oct 25, 2017 9:20 am

It appears that code worked okay. Here is the file "123" that was produced on my display that had no other files in flash.

total 0
-rw-rw-rw- 1 root 0 0 Jan 01 00:01 123
-rwx------ 1 root 0 0 Jan 01 00:01 placeholder.file


The only change I made was to change the eventId that is fired after the list is complete. The code snippet has the completion event as the same function that it's in.

listFiles(list, EventIDs.New_Event_Name);
Boyce Schrack
Enovation Controls
mzainuddin
Posts: 14
Joined: Sat Jan 31, 2015 11:35 pm

Re: listFiles not working

Post by mzainuddin » Sun Oct 29, 2017 3:46 am

Ah,

Thank you. I used it the same as I have used ListUSBFiles. I failed to notice that it created a text file with the structure and file names.