PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
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
Checks the existence of a directory.
Example
WINDEVWEBDEV - Server codeReports and QueriesJavaPHPAjaxUser code (UMC)
MyDirectory is string = "C:\DataDirectory"
IF fDirExist(MyDirectory) = True THEN
Info("The directory " + MyDirectory + " exists on disk")
END
WINDEV MobileWindows Mobile
MyDirectory is string = "\DataDirectory"
IF fDirExist(MyDirectory) = True THEN
Info("The directory " + MyDirectory + " exists on disk")
END
Syntax
<Result> = fDirExist(<Directory Name>)
<Result>: Boolean
  • True if the directory exists,
  • False otherwise (the name of the directory corresponds to a file name for example).
<Directory Name>: Character string (with quotes)
Name and full (or relative) path of the directory. The wildcard characters (*,?) are not allowed.
WindowsLinux This parameter can be in Ansi or Unicode format.
AndroidAndroid Widget This parameter can correspond to a full or relative path in relation to the current directory (returned by fCurrentDir). This parameter is case sensitive.
Reminder: In Android, the file system is read-only on the device and on the emulator. An application has the rights to write into its setup directory or into one of its sub-directories, as well as onto the external memory (SDCard).
Windows Mobile This path must necessarily be a full path. It cannot be a relative path.
Universal Windows 10 App The path of the directory corresponds to a relative path in relation to the current directory. The current directory corresponds to the data directory of the application.
Reminder: Only the directories found in the data directory associated with the application can be used.
iPhone/iPad This parameter can correspond to a full path or to a relative path in relation to the current directory (returned by fCurrentDir). This parameter is case sensitive.
Reminder: On iPhone/iPad, the file system is read-only on the device and on the emulator. An application has the rights to write into its setup directory or into one of its sub-directories.
Remarks
To check the existence of a file, use fFileExist.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230stp.dll
Windows Mobile wp230stp.dll
Java wd230java.jar
Linux wd230stp.so
Android wd230android.jar
Minimum required version
  • Version 21
This page is also available for…
Comments
Exemplo - ver se diretorio existe
Exemplo - ver se diretorio existe

s_diretorio is string="e:\aleva1"
IF fDirExist(s_diretorio) THEN
Info("Ja existe diretorio")
ELSE
Info("Nao Existe")
END

//Blog com Video e Exemplo
http://windevdesenvolvimento.blogspot.com.br/2016/08/curso-windev-arquivos-006-arquivos-ver.html
https://www.youtube.com/watch?v=VaDyezW5kaw


De matos AMARILDO
Aug. 17 2016