ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Standard functions / External file management functions
  • Programming standard in Windows XP, Vista and later
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
Returns a directory path for the data of the current user of the current application.
This directory can be used without restriction in Windows XP, Vista, ... This directory is used to store:
  • the configuration files of the application (.INI files, .XML files, ...) specific to the current user.
  • the data files specific to the current user (HFSQL.fic, .ndx and.mmo files).
This directory is automatically created if it does not exist.
Example
Trace(fDataDirUser())
// Sous Windows 7, le chemin renvoyé peut être par exemple:
// C:\Users\fp\AppData\Roaming\Applications WinDev\WD TreeMap
Syntax
<Result> = fDataDirUser([<Options>])
<Result>: Character string
Path of the directory to use for the data of the application user. The result returned by this function differs in test mode and at run time:
  • in test mode: <Home directory of user>\<Application data>\WINDEV applications\<Project name>
  • at run time: <Home directory of user>\<Application data>\<Company name>\<Executable name>
    Remark: the name of the company is specified when creating the executable. If this name is not specified, it is replaced by "WINDEV applications"
On Windows 98 and Me, <Result> is the application's runtime directory (also returned by the fExeDir function).
iPhone/iPad This directory corresponds to the "/Library/" directory of the application. See the documentation about the Apple iOS development for more details.
<Options>: Optional constant
Indicates whether the directory must be created or not:
fddDefault
(Default value)
The directory is created if it does not exist.
fddWithoutCreationThe directory is not created if it does not exist.
Remarks

Programming standard in Windows XP, Vista and later

To increase computer security against worms and viruses, Windows Vista (and later versions) has implemented the UAC mechanism (User Account Control).
By default, this mechanism considers that all the users (including the administrators) are standard users with reduced rights. To run an application that requires additional rights, the UAC mechanism asks for confirmation.
When you create your applications, we advise you to comply with the programming standard of Windows to give the ability to any user (without specific rights) to use your application. Therefore:
  • If an application must create or modify local HFSQL data files or configuration files (.INI, .XML), these files must be found in the directory corresponding to the application.
    • If these files are specific to the current user, they must be stored in the directory returned by fDataDirUser.
    • If these files are common to all users of the station, they must be stored in the directory returned by the fDataDirCommon function.
  • If several applications must create or modify the same HFSQL data files or configuration files (.INI, .XML), these files must be found in the common directory of applications
    • If these files are specific to the current user, they must be stored in the directory returned by fGlobalDirUser.
    • If these files are common to all users of the station, they must be stored in the directory returned by the fGlobalDirCommon function.
Summary table:
1 applicationSeveral applications
1 userfDataDirUserfGlobalDirUser
Several usersfDataDirCommonfGlobalDirCommon

Remarks:
  • These functions are recommended for the multi-user applications installed on a single computer or TSE.
  • If the domain or the Active Directory allows the use of a mobile profile, the user details are automatically copied when changing computer.
To help you create applications while complying with the programming standard, specific options are proposed by WINDEV when running the application test. For more details, see Configuring the test mode of project.
Component: wd260vm.dll
Minimum version required
  • Version 11
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2021

Send a report | Local help