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.
  • Closing a file opened several times
  • Closing a locked file
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
Closes an external file.
Versions 15 and later
WINDEVJava This function is now available for Java applications.
New in version 15
WINDEVJava This function is now available for Java applications.
WINDEVJava This function is now available for Java applications.
Versions 15 and later
Android This function is now available for Java applications.
New in version 15
Android This function is now available for Java applications.
Android This function is now available for Java applications.
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 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.
WINDEVWEBDEV - Server codeReports and QueriesJavaUser code (UMC)PHPAjax
// Ouverture d'un fichier externe
IDFichier is int
ResFerme is int
IDFichier = fOpen("C:\MesRépertoires\Fichier.txt", foReadWrite)
IF IDFichier <> -1 THEN
...
// Fermeture du fichier externe
ResFerme = fClose(IDFichier)
END
Syntax
<Result> = fClose(<File identifier>)
<Result>: Integer
  • 0 is the external file is closed,
  • -1 if an error occurred. To find out the wording of the error, use the function ErrorInfo with the constant errMessage. The fClose function generates an error if the file is not opened.
<File identifier>: Integer
Identifier of the file to be closed, defined with the fOpen or fCreate function.
PHP This parameter must be a variant.
Remarks

Closing a file opened several times

The same file can be opened several times simultaneously. Each version of the file must be closed individually via its own identifier.
WINDEVWEBDEV - Server codeReports and QueriesUser code (UMC)Ajax

Closing a locked file

A locked file will be automatically unlocked when it is closed.
Reminder: fLock is used to lock an external file. fUnlock is used to unlock an external file.
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