Yes, after you have opened the directory with File.DirOpen, you can list the files and directories with File.DirList.
The result is a struct of type FILE_DIR_ENTRY.
See the CAA File library for information about the struct.
Repeat this until the result of the DirList is eError: FILE.ERROR.NO_MORE_ENTRIES. Then you have completed listing the directory.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
DirList doesn't work properly with Ubuntu 14.04 or 16.04...seems that one of the subfolders is always transparent to function and FILE.ERROR.NO_MORE_ENTRIES is reached before it should. It works well in 12.04 but it's mandatory for us to use 14.04 or 16.04 in our current project. Seems that there was a similar issue with XP in the past: http://jira.codesys.com/browse/CDS-2107 ... DirList%22. Any ideas or workarounds?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If I had opened a directory correctly,is there a method to find out all the files(file name) and subdirectries (subdirectories name) under it ?
Yes, after you have opened the directory with File.DirOpen, you can list the files and directories with File.DirList.
The result is a struct of type FILE_DIR_ENTRY.
See the CAA File library for information about the struct.
Repeat this until the result of the DirList is eError: FILE.ERROR.NO_MORE_ENTRIES. Then you have completed listing the directory.
Thanks
DirList doesn't work properly with Ubuntu 14.04 or 16.04...seems that one of the subfolders is always transparent to function and FILE.ERROR.NO_MORE_ENTRIES is reached before it should. It works well in 12.04 but it's mandatory for us to use 14.04 or 16.04 in our current project. Seems that there was a similar issue with XP in the past: http://jira.codesys.com/browse/CDS-2107 ... DirList%22. Any ideas or workarounds?
Upgraded runtime from 3.5.2. to 3.5.7 and it works well...