Skip to content
Tcl Source Code Artifact [73daff148d]
Login

Artifact [73daff148d]

Artifact 73daff148d27768b59558c8638fd522dd045154a:

Ticket change [73daff148d] - New ticket [1880980fffffffff|1880980fff] <i>Option to [glob] to ease recursive traversal</i>. by evil_son on 2008-01-28 07:12:34.
D 2008-01-28T07:12:34
J assignee dkf
J cmimetype text/plain
J comment \nCurrently,\s\sto\straverse\sa\sdirectory\shierarchy:\sin\sthe\stop\sdirectory\swe\sneed\sto\sexplicitly\sglob\sfor\sall\sdirectory\sentries\s(including\sthose\sthat\sstart\swith\sa\speriod)\sand\sthen\sfilter\sout\s"."\sand\s".."\sand\sso\son\srecursively\sfor\schildren\sdirectories\n\nThe\sfollowing\ssuggested\soption\sto\s[glob]\swill\ssimplify\scode\sas\swell\sas\sprovide\ssome\sspeed\sincrease.\n\n[glob\s-walk]\swill\sreturn\sall\sdirectory\sentries\sin\sthe\scurrent\sdir\sincluding\sthose\sthat\sstart\swith\sa\speriod\s_except_\sfor\s"."\sand\s".."\s\si.e\sit\sfilters\sout\sthe\scurrent\sand\sparent\sdirectories.\s\sOther\sfilters\scan\sbe\sstacked\son\stop\sof\sit\sas\sper\susual\swith\s[glob]\n\nThis\soption\sdoes\s_not_\swalk\sthe\sentire\sdirectory\stree\srecursively.\s\sAs\ssuch\sthe\sname\s"-walk"\smay\sbe\sconsidered\smisleading.\n\n[glob\s-walk]\sessentially\sprovides\sa\sfilter\sto\sa\spreviously\ssuggested\soption\s[glob\s-all]:\srequest\sid\s1880967\sat\shttp://sourceforge.net/tracker/index.php?func=detail&aid=1880967&group_id=10894&atid=360894\nand\smay\swell\sbe\sused\smore\soften\sthan\s[glob\s-all]\sraising\sdoubts\sabout\sthe\sneed\sfor\sthe\slatter.\n\nChecking\sfor\srecursive\slinks\sin\sthe\sfilesystem\sis\sstill\sthe\sresponsibility\sof\sthe\suser.\n\ne.g\susage.\sTo\sprint\sthe\snames\sof\sall\sand\sonly\sdirectories\sunder\s$root:\n\nproc\srec-print-dirs\s{dir}\s{\n\s\sputs\s$dir\n\s\sforeach\sd\s[glob\s-walk\s-directory\s$dir\s-types\s{d}]\s{\n\s\s\s\srec-print-dirs\s$d\n\s\s}\n}\nrec-print-dirs\s$root\n\nThank\syou\nE\sWilson\n
J foundin None
J is_private 0
J priority 5\sMedium
J resolution None
J status Open
J submitter evil_son
J subsystem 16.\sCommands\sA-H
J title Option\sto\s[glob]\sto\sease\srecursive\straversal
J type RFE
K 1880980fffffffffffffffffffffffffffffffff
U evil_son
Z 77a542c7a389e49302bf8ffe5996cb16