ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE


New WINDEV, WEBDEV and WINDEV Mobile 28 feature!
This content has been translated automatically.  Click here  to view the French version.
  • Properties specific to the description of DiskFile variables
  • Functions that use the DiskFile type
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
DiskFile (Type of variable)
In french: FichierDisque
Inherits from %1
The DiskFile type is used to handle text files present on disk. The characteristics of this file can be defined and changed using different WLanguage properties.
Remark: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
Example
// Writing into a text file
MyFile is DiskFile = fOpen("File.txt")
MyFile.Write("Report")
Properties

Properties specific to the description of DiskFile variables

The following properties can be used to handle text files:
Property nameType usedEffect
DateCreatedDateTimeDate and time of file creation.
LinuxiPhone/iPadIOS WidgetMac Catalyst
This property is read-only.
DateLastAccessedDateTimeDate and time of last access to the file.
DateModifiedDateTimeDate and time of last file modification.
HandleSystem integer
  • File system handle,
  • -1 if no associated file.
This property is read-only.

Remark: The file associated with a DiskFile variable is automatically closed outside of the scope of the variable.
Remarks

Functions that use the DiskFile type

fLockEntirely or partially locks an external file.
fChangeSizeResizes an external file.
fFindFinds a character string or a buffer in a file opened by fOpen.
fUnlockEntirely or partially unlocks an external file.
fWriteWrites:
  • a character string into an external file.
  • a memory section.
fWriteLineWrites a line into a text file (ANSI or UNICODE).
fCloseCloses an external file.
fReadReads:
  • a block of bytes (characters) in an external file (ANSI or Unicode),
  • the content of an external file (ANSI or Unicode) and assigns it to a memory area.
fReadLineReads a line from an external file (ANSI or UNICODE).
fReadLineRegularExpressionReads a line in an external file, gets sections of this line according to a regular expression and assigns them to a variable.
fFileNameReturns the name of an external file that is currently opened.
fSeekReturns and modifies the current position in an external file.
fSizeReturns the size of a file (in bytes).
Minimum version required
  • Version 28
This page is also available for…
Comments
Click [Add] to post a comment