Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
A question about the mask
#8
(03-18-2023, 08:56 AM)Petr Wrote: But there is one more question. *.* should list folders and subdirectories if I remember correctly. Command$ won't do that. Is there a trick to get those subdirectories out of it? If it doesn't work out like this, I'll take a different approach, I'm just asking. I am working on upgrading my PMF2 program.

It will have to be done the "direntry.h" way. (The original C header file on Linux is called "dirent.h".) I'm not familiar with it but there should be a field in the structure which helps the programmer tell if the file is a "regular" file or if it's a directory. If it's a directory then you'll have to get another list of files for that directory. It's best to keep track of directories into a string array, as they are found and, after one directory is processed for the file names it has, take it out of the array.

Might want to look at this:

https://qb64phoenix.com/forum/showthread.php?tid=68

Understandably, "*.*" is limited only to the current directory because if could involve thousands of files in subdirectories, and this could choke certain command-line programs and other programs which are not well-written.
Reply


Messages In This Thread
A question about the mask - by Petr - 03-17-2023, 05:13 PM
RE: A question about the mask - by Petr - 03-17-2023, 05:34 PM
RE: A question about the mask - by mnrvovrfc - 03-17-2023, 08:52 PM
RE: A question about the mask - by mnrvovrfc - 03-17-2023, 09:19 PM
RE: A question about the mask - by Petr - 03-18-2023, 08:56 AM
RE: A question about the mask - by mnrvovrfc - 03-18-2023, 10:31 AM



Users browsing this thread: 1 Guest(s)