PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Path of UNC disk
  • Type of disk
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 information about a disk.
// Total disk size?
ResDiskSize is numeric = fDriveInfo("C:", fdTotalSpace)
Reports and Queries
// Name of volume
ResultName is string
ResultName = fDriveInfo("C:", fdVolumeName)
Info(ResultName)
Syntax
<Result> = fDriveInfo(<Disk Path> , <Information>)
<Result>: All types
  • Requested information.
  • 0 if an error occurred. To find out the error details, use ErrorInfo associated with the errMessage constant.
<Disk Path>: Character string (with quotes)
Path of disk to use in the following format:
  • <drive letter>:. For example: "A:". The drive letter is written in uppercase character.
  • UNC path. For example: "\\<ServerName>\<ShareName>". Some constraints exist depending on the operating system used and on the requested type of information (see the Notes).
<Information>: Constant
Specifies the requested type of information:
fdFreeSpaceAvailable disk space (in bytes)
fdTotalSpaceTotal size of the disk (in bytes)
fdNbClusterNumber of disk clusters
fdNbSectorPerClusterNumber of sectors per cluster
fdVolumeNameName of volume
fdSerialNumberSerial number of the disk, defined when the disk is formatted (differs from the serial number given by the manufacturer).
fdFileNameSizeMaximum size of file name on the disk (in characters)
fdSectorSizeSize of sector (in bytes)
fdDriveTypeType of disk (see the table below)
Remarks

Path of UNC disk

Depending on the operating system used and on the requested type of information, a UNC path can be used.
The table below presents the combinations that allow the use of a UNC path:
Requested informationUse of a UNC path allowed with the following operating systems:
fdFreeSpaceWindows 98, Me, NT, 2000, XP, 2003 Server, Vista, 7
fdTotalSpaceWindows 98, Me, NT, 2000, XP, 2003 Server, Vista, 7
fdNbClusterWindows Me, NT, 2000, XP, 2003 Server, Vista, 7
fdNbSectorPerClusterWindows Me, NT, 2000, XP, 2003 Server, Vista, 7
fdFileNameSizeWindows 98, Me, NT, 2000, XP, 2003 Server, Vista, 7
fdSectorSizeWindows Me, NT, 2000, XP, 2003 Server, Vista, 7
fdDriveTypeWindows 95, 98, Me, NT, 2000, XP, 2003 Server, Vista, 7
Reports and Queries

Type of disk

The types of disks are WLanguage constants. The possible values are:
ConstantValueType of disk
fdUnknown32Unknown type
fdRemovable1Removable disk (diskette, zip, etc.)
fdFixed2Fixed disk (hard disk)
fdInvalid0The specified path does not correspond to a disk
fdRemote4Network disk
fdCDRom8CD-ROM (and burners, DVD, etc.)
fdRAM16Virtual disk
Component : wd250std.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Video fDriveInfo
https://youtu.be/cYm2QdQatpo
https://windevdesenvolvimento.blogspot.com/2019/09/dicas-2270-windev-webdev-mobile.html

//btn_espaco_hd
TableDeleteAll(TABLE_HD)
LIVRE_C is int=LengthToString(fDriveInfo("C:",fdFreeSpace),sizeGB)
TOTAL_C is int=LengthToString(fDriveInfo("C:",fdTotalSpace),sizeGB)
nOCUPADO is int=TOTAL_C-LIVRE_C
EDT_TOTAL_HD=TOTAL_C

TableAddLine(TABLE_HD,"C: Livre ",LIVRE_C)
TableAddLine(TABLE_HD,"C: Ocupado",nOCUPADO)
grDraw(CHART_HD)
amarildo
03 Sep. 2019
Exemplo fdriveinfo
Exemplo: fDriveinfo

EDT_texto="Total Espaco Livre - fdFreeSpace["+LengthToString(fDriveInfo("C:",fdFreeSpace),sizeGB)+"]"+CR
EDT_texto+="Total Espaco Disco - fdTotalSpace["+LengthToString(fDriveInfo("C:",fdTotalSpace),sizeGB)+"]"+CR
EDT_texto+="Numero Serial Hd - fdSerialNumber["+fDriveInfo("C:",fdSerialNumber)+"]"+CR

//Blog com exemplo e video
http://windevdesenvolvimento.blogspot.com.br/2016/09/curso-windev-arquivos-011-arquivos.html
https://www.youtube.com/watch?v=9WOC6gh9-tk


De matos AMARILDO
04 Sep. 2016