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.
  • Error management
  • Equivalence
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 the size of a file (in bytes).
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 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.
JavaUser code (UMC)PHPAjax
// Taille d'un fichier
ResTaille = fSize("C:\MesRépertoires\Fichier.doc")
Windows Mobile
// Taille d'un fichier
ResTaille = fSize("\MesRépertoires\Fichier.psw")
Syntax
Windows MobileAndroidAndroid Widget iPhone/iPadJavaUser code (UMC)PHPAjax

Finding out the size of a file according to its path Hide the details

<Result> = fSize(<File path>)
<Result>: Integer
  • Size of the file (in bytes),
  • -1 if an error occurred. To get the details of the error, use ErrorInfo with the errMessage constant.
When handling files exceeding 2 GB, <Result> must correspond to an 8-byte integer.
<File path>: Character string (with quotes)
Name and full (or relative) path of file (up to 260 characters). A UNC path can be used. The wildcard characters (* and?) are not allowed.
Versions 15 and later
AndroidAndroid Widget This parameter can correspond to a full path or a path relative to the current directory (returned by fCurrentDir). This parameter is case-sensitive.
Reminder: In Android, the file system is read-only on the device and on the emulator. An application can only write to its setup directory or one of its subdirectories, as well as to the external memory (SDCard).
New in version 15
AndroidAndroid Widget This parameter can correspond to a full path or a path relative to the current directory (returned by fCurrentDir). This parameter is case-sensitive.
Reminder: In Android, the file system is read-only on the device and on the emulator. An application can only write to its setup directory or one of its subdirectories, as well as to the external memory (SDCard).
AndroidAndroid Widget This parameter can correspond to a full path or a path relative to the current directory (returned by fCurrentDir). This parameter is case-sensitive.
Reminder: In Android, the file system is read-only on the device and on the emulator. An application can only write to its setup directory or one of its subdirectories, as well as to the external memory (SDCard).
Windows Mobile This path must be a full path or a UNC path. It cannot be a relative path.
Versions 17 and later
iPhone/iPad This parameter can correspond to a full path or a path relative to the current directory (returned by fCurrentDir). This parameter is case-sensitive.
Reminder: On iPhone/iPad, the file system is read-only on the device and on the emulator. An application can only write to its setup directory or one of its subdirectories.
New in version 17
iPhone/iPad This parameter can correspond to a full path or a path relative to the current directory (returned by fCurrentDir). This parameter is case-sensitive.
Reminder: On iPhone/iPad, the file system is read-only on the device and on the emulator. An application can only write to its setup directory or one of its subdirectories.
iPhone/iPad This parameter can correspond to a full path or a path relative to the current directory (returned by fCurrentDir). This parameter is case-sensitive.
Reminder: On iPhone/iPad, the file system is read-only on the device and on the emulator. An application can only write to its setup directory or one of its subdirectories.
Versions 15 and later
Universal Windows 10 AppWindows MobileiPhone/iPadUser code (UMC)Ajax

Finding out the size of a file opened by the application Hide the details

<Result> = fSize(<File identifier>)
<Result>: Integer
  • Size of the file (in bytes),
  • -1 if an error occurred. To find out the name of the error, use the function ErrorInfo with the constant errMessage.
When handling files exceeding 2 GB, <Result> must correspond to an 8-byte integer.
<File identifier>: Integer
Identifier of the file returned by one of the following functions: fOpen, fCreate, fOpenTempFile, fMemOpen.
New in version 15
Universal Windows 10 AppWindows MobileiPhone/iPadUser code (UMC)Ajax

Finding out the size of a file opened by the application Hide the details

<Result> = fSize(<File identifier>)
<Result>: Integer
  • Size of the file (in bytes),
  • -1 if an error occurred. To find out the name of the error, use the function ErrorInfo with the constant errMessage.
When handling files exceeding 2 GB, <Result> must correspond to an 8-byte integer.
<File identifier>: Integer
Identifier of the file returned by one of the following functions: fOpen, fCreate, fOpenTempFile, fMemOpen.
Universal Windows 10 AppWindows MobileiPhone/iPadUser code (UMC)Ajax

Finding out the size of a file opened by the application Hide the details

<Result> = fSize(<File identifier>)
<Result>: Integer
  • Size of the file (in bytes),
  • -1 if an error occurred. To find out the name of the error, use the function ErrorInfo with the constant errMessage.
When handling files exceeding 2 GB, <Result> must correspond to an 8-byte integer.
<File identifier>: Integer
Identifier of the file returned by one of the following functions: fOpen, fCreate, fOpenTempFile, fMemOpen.
Remarks

Error management

The function fSize generates an error in the following cases:
  • the specified file does not exist,
  • the name of the specified file is invalid.
Remark: fSize does not operate on the hidden files.
Windows Mobile

Equivalence

fSize and ceFileSize have equivalent operating modes.
The only difference is:
  • fSize handles a file found on the Pocket PC from a WINDEV Mobile application.
  • ceFileSize handles a file on the Pocket PC from a WINDEV application.
Component: wd260std.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Video fSize
https://youtu.be/HyN7Hq54yIw

https://windevdesenvolvimento.blogspot.com/2019/06/dicas-2171-windev-webdev-mobile-arquivo.html

// BTN_TAMANHO_ARQUIVO

n_tamanho_arquivo is int=fSize(EDT_ARQUIVO)
EDT_RESPOSTA=LengthToString(n_tamanho_arquivo,sizeB)+CR
EDT_RESPOSTA+=LengthToString(n_tamanho_arquivo,sizeGB)+CR
EDT_RESPOSTA+=LengthToString(n_tamanho_arquivo,sizeKB)+CR
EDT_RESPOSTA+=LengthToString(n_tamanho_arquivo,sizeMB)+CR
EDT_RESPOSTA+=LengthToString(n_tamanho_arquivo,sizeTB)+CR
amarildo
28 Jun. 2019