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.
  • Miscellaneous
  • The data directory can be specified during the setup
  • Remark
  • Data folders in Android
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Returns the full path of the directory of HFSQL data files specified by the user when installing the application.
Remark: This directory does not necessarily correspond to the real directory of the data files at run time (that may have been modified by HSubstDir, HChangeDir, ...).
Versions 16 and later
Android This function is now available for Android applications.
AndroidAndroid Widget In Android, returns the full path of the default directory containing the databases of the application. This directory cannot be configured.
New in version 16
Android This function is now available for Android applications.
AndroidAndroid Widget In Android, returns the full path of the default directory containing the databases of the application. This directory cannot be configured.
Android This function is now available for Android applications.
AndroidAndroid Widget In Android, returns the full path of the default directory containing the databases of the application. This directory cannot be configured.
Versions 17 and later
iPhone/iPad This function is now available for iPhone/iPad applications.
New in version 17
iPhone/iPad This function is now available for iPhone/iPad applications.
iPhone/iPad This function is now available for iPhone/iPad applications.
Versions 18 and later
Android Widget This function is now available in Android widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
New in version 18
Android Widget This function is now available in Android widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Android Widget This function is now available in Android widget 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.
Remark: From version 19, HFSQL is the new name of HyperFileSQL.
Example
// Création d'un fichier .INI
RepINI is string
IF fDataDir() <> "" THEN
RepINI = fDataDir() + ["\"] + "MONPROJET.INI"
ELSE
RepINI = "MONPROJET.INI"
END
INIWrite("SECTION", "DEJALANCE", "OUI", RepINI)
Syntax
<Result> = fDataDir()
<Result>: Character string
  • Full path (for example: "D:\DATA\Rewali") or UNC path (for example: "\\SERVER\DATA\Rewali") of the directory for the HFSQL data files.
  • Result of fExeDir if no directory was specified during the setup (in test mode and when running an executable without setup).
  • Versions 15 and later
    AndroidAndroid Widget Full path of the default directory containing the application database(s) in the internal storage area. This directory corresponds to the "Databases" directory of the application. This directory cannot be configured.
    New in version 15
    AndroidAndroid Widget Full path of the default directory containing the application database(s) in the internal storage area. This directory corresponds to the "Databases" directory of the application. This directory cannot be configured.
    AndroidAndroid Widget Full path of the default directory containing the application database(s) in the internal storage area. This directory corresponds to the "Databases" directory of the application. This directory cannot be configured.
  • Versions 17 and later
    iPhone/iPadIOS WidgetMac Catalyst Full path of the directory containing the databases of the application. This directory corresponds to the "Documents" directory of application. This directory cannot be configured.
    New in version 17
    iPhone/iPadIOS WidgetMac Catalyst Full path of the directory containing the databases of the application. This directory corresponds to the "Documents" directory of application. This directory cannot be configured.
    iPhone/iPadIOS WidgetMac Catalyst Full path of the directory containing the databases of the application. This directory corresponds to the "Documents" directory of application. This directory cannot be configured.
Remarks
WINDEVReports and QueriesUser code (UMC)

Miscellaneous

  • If HSubstDir is used in the code of the application, the directory specified by the user during the setup will be ignored.
  • If the data files are described in the analysis with a specific directory (not recommended), this directory will not be taken into account. Only the directory specified by the user during the setup will be taken into account.
  • The fDataDir function is not equivalent to the Directory property.
WEBDEV - Server codeAjax

The data directory can be specified during the setup

  • In the setup is performed via physical media, the directory of the data files is specified during the setup.
  • For a remote setup (FTP), the Internet provider supplies the home directory for the data files and the user supplies the name of the sub-directory in which the data files are installed.
PHP

Remark

fDataDir and fExeDir return the same value.
Android Widget

Data folders in Android

In Android, the folders corresponding to the data are not simply identified.
The following code is used to list the main files and the correspondence of these files when the device is connected to a computer.
// Liste les différents principaux dossiers utilisables sous Android
sInfoRépertoire is string
 
// Dossier par défaut des données
sInfoRépertoire += [CR] + "fRepDonnées: " + fDataDir()
// Exemple: /data/user/0/com.masociete.nom_du_projet/databases
// Dossier NON accessible par un ordinateur lorsqu'il est connecté
 
// Carte externe principale de stockage
// (ou stockage interne qui émule une carte externe)
sInfoRépertoire += [CR] + "SysRepCarteStockage: " + SysDirStorageCard()
// Exemple: /storage/emulated/0
// Dossier accessible par un ordinateur lorsqu'il est connecté,
// il est vu comme la "racine" d'un disque de l'appareil
 
//Tous les périphériques sur lesquels il est possible de lire ou écrire
FOR n= 1 _TO_ SysNbExternalStorage()
// Dossier de base de ce périphérique (ou périphérique émulé)
sInfoRépertoire += [CR]+ "SysRepStockageExterne(" + n + ", ssePublic): " + ...
SysDirExternalStorage(n, ssePublic)
// Exemple pour une carte émulée: /storage/emulated/0
// Dossier accessible par un ordinateur lorsqu'il est connecté,
// il est vu comme la "racine" d'un disque de l'appareil
 
// Répertoire des fichiers de données de l'application en cours
// (lorsque les données sont sur carte)
sInfoRépertoire += [CR] + "SysRepStockageExterne(" + n + ", sseAppFichier): " + ...
SysDirExternalStorage(n, sseAppFile)
// Exemple: /storage/emulated/0/Android/data/com.masociete.nom_du_projet/files
// Dossier accessible par un ordinateur lorsqu'il est connecté,
// il est vu comme le sous-dossier
// "\Android\data\com.masociete.nom_du_projet\files" d'un disque
 
// Répertoire des documents de l'application en cours
sInfoRépertoire += [CR] + "SysRepStockageExterne(" + n + ", sseAppDocument): " + ...
SysDirExternalStorage(n, sseAppDocument)
// Exemple: /storage/emulated/0/Android/data/com.masociete.nom_du_projet/files/Documents
// Dossier accessible par un ordinateur lorsqu'il est connecté,
// il est vu comme le sous-dossier
// "\Android\data\com.masociete.nom_du_projet\Documents" d'un disque
 
// Répertoire des documents "publics" / "partagés" donc commun à toutes les applications
sInfoRépertoire += [CR] + "SysRepStockageExterne(" + n + ",ssePublicDocument): " + ...
SysDirExternalStorage(n, ssePublicDocument)
// Exemple: /storage/emulated/0/Documents
// Dossier accessible par un ordinateur lorsqu'il est connecté,
// il est vu comme le sous-dossier "\Documents" d'un disque
 
END
 
// Répertoire des fichiers de cache de l'application
// (ces données peuvent être supprimées par l'utilisateur ou le système)
sInfoRépertoire += [CR] + "fRepCache: " + fCacheDir()
// Exemple: /data/user/0/com.masociete.nom_du_projet/cache
// Dossier NON accessible par un ordinateur lorsqu'il est connecté
 
// Pour avoir l'information dans les traces de Android Device Monitor
// (.\Personnel\Android\AndroidSDK\tools\monitor.bat)
Trace(sInfoRépertoire)
Info(sInfoRépertoire)
Component: wd270vm.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment