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.
  • Space character
  • Modifying the current disk and directory
  • Current directory during the tests
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
Identifies or modifies the current directory.
Versions 15 and later
Android This function is now available for Android applications.
New in version 15
Android This function is now available for Android applications.
Android This function is now available for Android applications.
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.
New in version 18
Android Widget This function is now available in Android widget mode.
Android Widget This function is now available in Android widget 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.
// Connaître le répertoire en cours
ResRepEnCours = fCurrentDir()
Syntax

Finding out the current directory on the specified disk Hide the details

<Result> = fCurrentDir([<Disk> [, <Option>]])
<Result>: Character string
  • Path of current directory on the specified disk (up to 260 characters). This path ends with a "\" character at the root of a disk only ("A:\" for example).
    Versions 15 and later
    AndroidAndroid Widget This directory corresponds to the directory that will be used to store the private application files in the internal storage area ("files" directory). You have the ability to read and write in this directory.
    New in version 15
    AndroidAndroid Widget This directory corresponds to the directory that will be used to store the private application files in the internal storage area ("files" directory). You have the ability to read and write in this directory.
    AndroidAndroid Widget This directory corresponds to the directory that will be used to store the private application files in the internal storage area ("files" directory). You have the ability to read and write in this directory.
    Versions 17 and later
    iPhone/iPadIOS WidgetMac Catalyst This directory corresponds to the "Documents" directory of application. You have the ability to read and write in this directory. The files found in this directory can be accessed by iTunes.
    New in version 17
    iPhone/iPadIOS WidgetMac Catalyst This directory corresponds to the "Documents" directory of application. You have the ability to read and write in this directory. The files found in this directory can be accessed by iTunes.
    iPhone/iPadIOS WidgetMac Catalyst This directory corresponds to the "Documents" directory of application. You have the ability to read and write in this directory. The files found in this directory can be accessed by iTunes.
    Versions 21 and later
    Universal Windows 10 App By Default (if the <Disk> parameter is not specified), this directory corresponds to the setup directory of the application. You cannot read or write in this directory.
    New in version 21
    Universal Windows 10 App By Default (if the <Disk> parameter is not specified), this directory corresponds to the setup directory of the application. You cannot read or write in this directory.
    Universal Windows 10 App By Default (if the <Disk> parameter is not specified), this directory corresponds to the setup directory of the application. You cannot read or write in this directory.
  • -1 if an error occurred. To find out the wording of this error, use the function ErrorInfo with the constant errMessage.
<Disk>: Optional character string
Name of disk where the current directory will be sought. This name has the following format:
  • <drive letter>:. For example: "A:".
  • UNC path. For example: "\\<ServerName>\<ShareName>".
If this parameter is not specified, the disk corresponds to the current disk.
AndroidAndroid Widget iPhone/iPadIOS WidgetMac Catalyst This parameter is not available.
<Option>: Optional Integer constant
Versions 15 and later
Used to specify the format of function result. By default, fCurrentDir returns a character string in Ansi format.
fPathUNICODE<Result> will be a character string in Unicode format.

AndroidAndroid Widget iPhone/iPadIOS WidgetMac Catalyst This parameter is not available.
New in version 15
Used to specify the format of function result. By default, fCurrentDir returns a character string in Ansi format.
fPathUNICODE<Result> will be a character string in Unicode format.

AndroidAndroid Widget iPhone/iPadIOS WidgetMac Catalyst This parameter is not available.
Used to specify the format of function result. By default, fCurrentDir returns a character string in Ansi format.
fPathUNICODE<Result> will be a character string in Unicode format.

AndroidAndroid Widget iPhone/iPadIOS WidgetMac Catalyst This parameter is not available.

Modifying the current directory Hide the details

<Result> = fCurrentDir(<Path of new current directory> [, <Option>])
<Result>: Character string
  • Path of current directory (up to 260 characters). This path ends with a "\" character at the root of a disk only ("A:\" for example).
  • -1 if an error occurred. To find out the wording of this error, use the function ErrorInfo with the constant errMessage.
<Path of new current directory>: Character string
Full (or relative) path of new current directory (up to 260 characters). A UNC path can be used: it must have the following format: "\\<ServerName>\<ShareName>\<DirectoryName>".
<Option>: Optional Integer constant
Versions 15 and later
Used to specify the format of function result. By default, fCurrentDir returns a character string in Ansi format.
fPathUNICODE<Result> will be a character string in Unicode format.

AndroidAndroid Widget iPhone/iPadIOS WidgetMac Catalyst This parameter is not available.
New in version 15
Used to specify the format of function result. By default, fCurrentDir returns a character string in Ansi format.
fPathUNICODE<Result> will be a character string in Unicode format.

AndroidAndroid Widget iPhone/iPadIOS WidgetMac Catalyst This parameter is not available.
Used to specify the format of function result. By default, fCurrentDir returns a character string in Ansi format.
fPathUNICODE<Result> will be a character string in Unicode format.

AndroidAndroid Widget iPhone/iPadIOS WidgetMac Catalyst This parameter is not available.
Remarks

Space character

The trailing spaces of <Path of new current directory> are automatically removed by fCurrentDir:
fCurrentDir("C:\MonRépertoire\    ")
is equivalent to:
fCurrentDir("C:\MonRépertoire")

Modifying the current disk and directory

To change the disk, we recommend that you use:
  1. fCurrentDrive to modify the current disk,
  2. fCurrentDir to modify the current directory on the new disk.
If the disk requested by fCurrentDir does not correspond to the current disk, the change of disk is automatically performed.

Current directory during the tests

When running tests from the WINDEV editor (window or project GO), the current directory corresponds to:
Related Examples:
Handling text files Unit examples (WINDEV): Handling text files
[ + ] Handling "text" files with WINDEV:
- Create a text file
- Write into a text file
- Read in a text file
Handling text files Unit examples (WEBDEV): Handling text files
[ + ] This example explains how to handle "non HFSQL" files with WEBDEV and it allows you to:
- Create a text file
- Write into a text file
- Read in a text file
Handling text files Unit examples (WINDEV Mobile): Handling text files
[ + ] Handling external "text" files:
- Create a text file
- Write into a text file
- Read in a text file
Component: wd270std.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment