Author Topic: IDrive.FileSystem Property  (Read 3177 times)

0 Members and 1 Guest are viewing this topic.

Offline José Roca

  • Administrator
  • Hero Member
  • *****
  • Posts: 2517
  • User-Rate: +209/-0
  • Gender: Male
IDrive.FileSystem Property
« on: July 14, 2008, 05:21:15 AM »

The following code illustrates the use of the FileSystem property:

JScript

Code: [Select]
function ShowFileSystemType(drvPath)
{
   var fso,d, s;
   fso = new ActiveXObject("Scripting.FileSystemObject");
   d = fso.GetDrive(drvPath);
   s = d.FileSystem;
   return(s);
}

VBScript

Code: [Select]
Function ShowFileSystemType(drvspec)
   Dim fso,d
   Set fso = CreateObject("Scripting.FileSystemObject")
   Set d = fso.GetDrive(drvspec)
   ShowFileSystemType = d.FileSystem
End Function

PowerBASIC

Code: [Select]
FUNCTION ShowFileSystemType (BYVAL drvspec AS STRING) AS STRING

   LOCAL fso AS IFileSystem
   LOCAL d AS IDrive
   
   fso = NEWCOM "Scripting.FileSystemObject"
   d = fso.GetDrive(UCODE$(drvspec))
   FUNCTION = ACODE$(d.FileSystem)

END FUNCTION