PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
This content has been translated automatically. Click here to view the French version.
  • Error management
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Lists the subdirectories of a given directory and returns the full paths of listed subdirectories.
Other uses: For each directory found, fListDirectory can automatically call a special procedure written in WLanguage. This procedure is used to handle the current directory. In this case, fListDirectory returns the number of listed directories.
Versions 16 and later
Universal Windows 10 App This function is now available for Windows Phone applications.
New in version 16
Universal Windows 10 App This function is now available for Windows Phone applications.
Universal Windows 10 App This function is now available for Windows Phone applications.
Versions 18 and later
Universal Windows 10 App This function is now available in Windows Store apps mode.
New in version 18
Universal Windows 10 App This function is now available in Windows Store apps mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Versions 21 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
WINDEVJavaUser code (UMC)
UnRépertoire, ResListeRépertoire are strings
RépertoireAlister is string
RépertoireAlister = "C:\MesDocuments"
// Windows Mobile: RépertoireAlister = "\MesDocuments"
 
// Liste tous les répertoires présents dans RépertoireAlister.
ResListeRépertoire = fListDirectory(RépertoireAlister)
// Pour chaque répertoire trouvé
FOR EACH STRING UnRépertoire OF ResListeRépertoire SÉPARÉE BY CR
// Ajout du répertoire dans la table TABLE_TableRep
TableAdd(TABLE_TableRep, UnRépertoire)
END
WINDEVJavaUser code (UMC)
RépertoireAlister = "C:\MesDocuments"
// Windows Mobile: RépertoireAlister = "\MesDocuments"
 
 
// Liste les répertoires présents dans RépertoireAlister.
// La procédure AttributRepertoire retourne le nombre de répertoires en lecture seule.
ResListeRépertoire = fListDirectory(RépertoireAlister, "AttributRépertoire")
Syntax

Listing the subdirectories of a directory Hide the details

<Result> = fListDirectory(<Path of initial directory> [, <Options>])
<Result>: Character string
Name of listed directories, separated by CR characters (Carriage Return).
<Path of initial directory>: Character string (with quotes)
Path of directory from which the subdirectories will be sought.
Versions 15 and later
WindowsLinux This parameter can be in Ansi or Unicode format.
New in version 15
WindowsLinux This parameter can be in Ansi or Unicode format.
WindowsLinux This parameter can be in Ansi or Unicode format.
Versions 16 and later
Universal Windows 10 App The directory path corresponds to a relative path in relation to the current directory. The current directory corresponds to the data directory of application.
Reminder: Only the directories found in the data directory associated with the application can be used.
New in version 16
Universal Windows 10 App The directory path corresponds to a relative path in relation to the current directory. The current directory corresponds to the data directory of application.
Reminder: Only the directories found in the data directory associated with the application can be used.
Universal Windows 10 App The directory path corresponds to a relative path in relation to the current directory. The current directory corresponds to the data directory of application.
Reminder: Only the directories found in the data directory associated with the application can be used.
<Options>: Integer constant or combination of constants (optional)
Options that can be taken into account:
fPathUNICODE
Versions 15 and later
<Result> will be a string in Unicode format.
New in version 15
<Result> will be a string in Unicode format.
<Result> will be a string in Unicode format.
Versions 16 and later
Universal Windows 10 App This constant is ignored.
New in version 16
Universal Windows 10 App This constant is ignored.
Universal Windows 10 App This constant is ignored.
fdInterruptibleThe browse can be interrupted by pressing the ESC key. The function will return the name of directories listed until the interruption.
Universal Windows 10 App This constant has no effect.
frNotRecursiveThe browse is a non-recursive browse. Subdirectories are ignored.
frRecursive
(Default value)
The browse is recursive. Subdirectories are automatically taken into account.
WINDEVJavaUser code (UMC)

Listing the subdirectories of a directory by calling a procedure for each directory Hide the details

<Result> = fListDirectory(<Path of initial directory> , <WLanguage procedure> [, <Pointer> [, <Options>]])
<Result>: Integer
Number of listed directories.
<Path of initial directory>: Character string (with quotes)
Path of directory from which the subdirectories will be sought.
Versions 15 and later
WindowsLinux This parameter can be in Ansi or Unicode format.
New in version 15
WindowsLinux This parameter can be in Ansi or Unicode format.
WindowsLinux This parameter can be in Ansi or Unicode format.
<WLanguage procedure>: Procedure name
Name of the Procedure WLanguage ("callback") called for each directory listed. This procedure is used to handle the current directory.
For more details on this procedure, see Parameters of the procedure used by fListDirectory.
<Pointer>: Optional integer
Pointer passed to <Procedure name>.
<Options>: Combination of Integer constants
Type of browse performed for the directory files:
fPathUNICODE
Versions 15 and later
<Result> will be a string in Unicode format.
New in version 15
<Result> will be a string in Unicode format.
<Result> will be a string in Unicode format.
fdInterruptibleThe browse can be interrupted by pressing the ESC key. The function will return the number of directories listed until the interruption.
frNotRecursiveThe browse is a non-recursive browse. Subdirectories are ignored.
frRecursive
(Default value)
The browse is recursive. Subdirectories are automatically taken into account.
Remarks

Error management

Caution: fListDirectory returns no error code. To find out whether this function generated an error, use function ErrorInfo with constant errMessage.
Related Examples:
The fListFile function Unit examples (WINDEV): The fListFile function
[ + ] Using fListFile and its syntax that directly returns the list of files/directories found in string format.
Component: wd260std.dll
Minimum version required
  • Version 10
This page is also available for…
Comments
Click [Add] to post a comment