Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Filer.dll
Message
De
28/01/2005 09:23:21
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Titre:
Versions des environnements
Visual FoxPro:
VFP 6 SP5
Divers
Thread ID:
00981681
Message ID:
00981692
Vues:
60
This message has been marked as a message which has helped to the initial question of the thread.
>Hi all
>
>Filer.dll help says the following:
>
>FileExpression C The file search mask that can include multiple masks separated by semicolons (;). For example, the file search mask *.scx; *.sct specifies to search for all files with the extensions .scx and .sct.
>The default file search mask is *.*.
>Read-write.
>
>but when I specfied something like this foxuser.*; default.fky it generates and error.
>
>What did I do wrong.
>
>Please advise.

I just tried and no error. ie:
lcDir = Sys(5)+Curdir()
*? GetTree(Getdir(),'*.prg;*.scx;*.vcx',.T.)
? GetTree(lcDir,'foxuser.*; default.fky',.T.)
Go Top
Brow

Function GetTree
  Lparameters tcStartDir,tcSkeleton,tlSubfolders
  Create Cursor filelist ;
    (filepath c(50), filename c(50), ;
    filesize i, fattr c(8), createtime T, lastacc T, lastwrite T)
  oFiler = Createobject('filer.fileutil')
  With oFiler
    .SearchPath = tcStartDir
    .Subfolder = tlSubfolders
    .SortBy = 5
    .SortDirection = 1
    .FileExpression = tcSkeleton
    .Find(0)
    For ix=1 To .Files.Count
      With .Files(ix)
        If !(Bittest(.Attr,4) And .Name = '.')
          Insert Into filelist ;
            (filepath, filename, filesize, fattr, createtime, lastacc, lastwrite)  ;
            values ;
            (.Path, .Name, .Size, Attr2Char(.Attr), ;
            Num2Time(.Datetime), Num2Time(.LastAccessTime), Num2Time(.LastWriteTime))
        Endif
      Endwith
    Endfor
    Return .Files.Count
  Endwith

Function Num2Time
  Lparameters tnFloat
  Return Dtot({^1899/12/30}+Int(tnFloat))+86400*(tnFloat-Int(tnFloat))

  *!*	#Define FILE_ATTRIBUTE_READONLY             0x00000001
  *!*	#Define FILE_ATTRIBUTE_HIDDEN               0x00000002
  *!*	#Define FILE_ATTRIBUTE_SYSTEM               0x00000004
  *!*	#Define FILE_ATTRIBUTE_DIRECTORY            0x00000010
  *!*	#Define FILE_ATTRIBUTE_ARCHIVE              0x00000020
  *!*	#Define FILE_ATTRIBUTE_ENCRYPTED            0x00000040
  *!*	#Define FILE_ATTRIBUTE_NORMAL               0x00000080

Function Attr2Char
  Lparameters tnAttr
  Return ;
    IIF(Bittest(tnAttr,0),'RO','RW')+;
    IIF(Bittest(tnAttr,1),'H','_')+;
    IIF(Bittest(tnAttr,2),'S','_')+;
    IIF(Bittest(tnAttr,4),'D','_')+;
    IIF(Bittest(tnAttr,5),'A','_')+;
    IIF(Bittest(tnAttr,6),'E','_')+;
    IIF(Bittest(tnAttr,7),'N','_')
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform