|
List functions: thisThis library contains some Text functions: file Instructions: filefile system tools, like traversing a whole directory tree. It's Operators: Bitwise Not "~" Operators: Boolean Negation "!"not much yet. (as of version 0.8.7)
List functions: thisThis Text functions: file Instructions: filefile is included in every distribution.
DIR.vl
Instructions: var How does VScript::Value() work?: Var*&var List functions: dir Instructions: dir Shell Immediate Commands: dirDIR.ExcludePatterns = { ".*" }
/* recursively walk directory tree
Pattern may be an absolute Operators: Boolean Or with Variable "||=" Operators: Bitwise Or with Variable "|=" Operators: Bitwise Or "|" Operators: Boolean Or "||"or relative path,
optionally containing a pattern in Flow control: if … then Flow control: try … thenthe last path component
Instructions: procProc(Pattern) is is called for each matched Text functions: link Instructions: linklink, Text functions: file Instructions: filefile Operators: Boolean Or with Variable "||=" Operators: Bitwise Or with Variable "|=" Operators: Bitwise Or "|" Operators: Boolean Or "||"or List functions: dir Instructions: dir Shell Immediate Commands: dirdir
Flow control: whileWhile FollowSymlink is >= 1, symlinks to directories are followed
Items in directories which Numeric functions: matchmatch patterns in List functions: dir Instructions: dir Shell Immediate Commands: dirDIR.ExcludePatterns are skipped
*/
Instructions: var How does VScript::Value() work?: Var*&var List functions: dir Instructions: dir Shell Immediate Commands: dirDIR.DoRecursive = Instructions: procproc ( Pattern, Instructions: procProc, FollowSymlink )
{
Flow control: if … thenif Numeric functions: isfileisfile Pattern Instructions: procProc(Pattern) Flow control: returnreturn Flow control: if … then Flow control: try … thenthen // Text functions: file Instructions: filefile Operators: Boolean Or with Variable "||=" Operators: Bitwise Or with Variable "|=" Operators: Bitwise Or "|" Operators: Boolean Or "||"or Text functions: link Instructions: linklink to Text functions: file Instructions: filefile
Flow control: if … thenif Numeric functions: isdirisdir Pattern && Text functions: rightstrrightstr(Pattern,1)!="/" Pattern #= "/" Flow control: if … then Flow control: try … thenthen
Flow control: if … thenif Numeric functions: islinkislink Pattern
Flow control: if … thenif FollowSymlink<=0 Instructions: procProc(Pattern) Flow control: returnreturn Flow control: if … then Flow control: try … thenthen // don't follow symlink
Flow control: if … thenif !Numeric functions: isdirisdir Pattern Instructions: procProc(Pattern) Flow control: returnreturn Flow control: if … then Flow control: try … thenthen // symlink broken
Flow control: if … then Flow control: try … thenthen
Instructions: var How does VScript::Value() work?: Var*&var Path = Pattern[to Numeric functions: rfindrfind(Pattern,"/")]
Instructions: procProc(Path)
Instructions: var How does VScript::Value() work?: Var*&var d = List functions: dir Instructions: dir Shell Immediate Commands: dirdir Pattern
Instructions: var How does VScript::Value() work?: Var*&var i = 0
Flow control: do … loopdo
Flow control: whilewhile ++i <= Numeric functions: countcount d
Instructions: var How does VScript::Value() work?: Var*&var Vipsi command syntax: Identifiers (names) Identifiers, names Operators: Make Identifier "@" Text functions: name Glossary: Name, IdentifierName = d[i].dir: fnamefname
Instructions: var How does VScript::Value() work?: Var*&var j = 0
Flow control: do … loopdo
Flow control: whilewhile ++j <= Numeric functions: countcount ExcludePatterns
Flow control: untiluntil Numeric functions: matchmatch(Vipsi command syntax: Identifiers (names) Identifiers, names Operators: Make Identifier "@" Text functions: name Glossary: Name, IdentifierName,ExcludePatterns[j] )
Flow control: untiluntil Numeric functions: matchmatch(Vipsi command syntax: Identifiers (names) Identifiers, names Operators: Make Identifier "@" Text functions: name Glossary: Name, IdentifierName,ExcludePatterns[j]#"/")
Flow control: do … looploop
Flow control: if … thenif j <= Numeric functions: countcount ExcludePatterns Flow control: nextnext Flow control: if … then Flow control: try … thenthen
DoRecursive(Path#Vipsi command syntax: Identifiers (names) Identifiers, names Operators: Make Identifier "@" Text functions: name Glossary: Name, IdentifierName,Instructions: procProc,FollowSymlink-1)
Flow control: do … looploop
}
| |