import Program.Dual
The Program.Dual Class implements a portable file and directory path format. The paths interoperate between Windows and Unix file systems. For example you can use either forward or backward slashes on both kinds of operating systems. However, using drive letters is unique to Windows.
/ \ Forward or backward slashes may be used to separate path components. - A lead dash on a path will access the HOME directory. // \\ Double leading slashes denotes a network server. ' " One or more path components can be quoted to accomodate special characters. . A lead component that is a dot references the current working dirctory. : On Windows a drive is selected with a lead drive letter and colon.
Path names are also case insensitive. With Unix file systems quoted components are case sensitive.
'c:\program files' On Windows this is not case sensitive. 'c:/program files' A forward slash works on Windows as well. "c:program files" A slash after the drive letter is optional. c:'program files' Individual path components can be quoted.
Wildcards in components select multiple components. An star is implicitly added to the end of each component. It can be suppressed by adding a trailing tick to the component. A quote at the end of a component also suppresses the trailing star.
* A star matches zero or more characters. ` Suppress an implicit trailing star. . A component that is a single dot is the same as a star. .. A component that consists of multiple dots references up level directories ! Match a single character. ? Match zero or one character. # Match a single decimal digit.
Here are some wildcard examples.
.s items with a leading '.s' in the current directory s items with a leading 's' in the current directory s* items with a leading 's' in the current directory ./s items with a leading 's' in the current directory ./s* items with a leading 's' in the current directory .\s items with a leading 's' in the current directory .\s* items with a leading 's' in the current directory * all files and directories in the current directory . all files and directories in the current directory ./* all files and directories in the current directory ./. all files and directories in the current directory .\* all files and directories in the current directory .\. all files and directories in the current directory */* all files and directories down one level */. all files and directories down one level .//* all files and directories down one level .//*. all files and directories down one level *//* all files and directories down one level *//. all files and directories down one level .///* all files and directories down one level .///. all files and directories down one level ./ directories in the current directory */ directories in the current directory ./s/ directories with a leading 's' in the current directory ./s/ directories with a leading 's' in the current directory ..s items with a leading 's' in the directory one level up ../s items with a leading 's' in the directory one level up ...s items with a leading 's' in the directory two levels up .../s items with a leading 's' in the directory two levels up ../../s items with a leading 's' in the directory two levels up / items in the top level directory /. items in the top level directory /* items in the top level directory c: items in the top level directory c:/ items in the top level directory c:/* items in the top level directory c:/. items in the top level directory *: all drives .: all drives // all accesible network diretories
Find.Path { Id Directory.Id, Partial Queue..string, First Bit, Directory string, Prefix string, Tail string }
Wild.File( entry Wild string ) >>> Tame string Is.Single( ~Wild.File ) ==> Single Bit Wild.Path( entry Wild string ) >>> Tame string Is.Single( ~Wild.Path ) ==> Single Bit Wild.Directory( entry Wild string ) >>> exit Tame string Is.Single( ~Wild.Directory ) ==> Single Bit Wild.Text( entry Wild string ) >>> Tame string Is.Single( ~Wild.Text ) ==> Single Bit Wild.Executable( entry Wild string ) >>> Tame string Is.Single( ~Wild.Executable ) ==> Single Bit OPEN change Find.Path, entry Dual string, exit Lead string, Single Bit NEXT change Find.Path, exit Path string, Element Directory.Member MATCH change Find.Path, exit Path string, Element Directory.Member, Size cell CLOSE change Find.Path DRAIN change Find.Path safe OPEN.DI change Find.Path, entry Dual string, exit Lead string, Single Bit NEXT.DI change Find.Path, entry Hidden = 0 Bit, exit Path string, Attribute MATCH.WILD entry Tame string, Wild string, Case = 0 Bit, exit Match Bit, Partial word NEXT.COMPONENT entry Dual string, change Index word, exit Name string, Dot parcel DUAL.TAIL entry Dual string, exit Tail string PATH.TAIL entry Dual string, change Index word, exit Tail string PATH.ELEMENT entry Path string, exit Element Directory.Member, Size cell Unquote.Lead.Dual( Dual string ) ==> Path string COMPONENT.WILD entry Component string, exit Wild string DI.PATH entry Os string, Element Directory.Member, Raw = 0 Bit DI.PATH.ATTRIBUTE entry Os string, Attribute, Raw = 0 Bit FORM.PATH.LONG entry Lead string, Tail string, exit Long string FORM.PATH.MULTI entry Dual string, exit Path string TRIM.UP.PREFIX change Prefix string, entry Remove parcel Is.Dual.Lead( C byte ) ==> Pass Bit DIRECTORY.TAIL entry Dual string, exit Lead string, Tail string pure TAME.COMPONENT entry Tail string, exit Tame string safe Os.To.Dual.Path( Os string ) ==> Dual string OS.TO.DUAL.PROMPT entry Os string, exit Dual string OS.TO.DUAL.FORM entry Os string, exit Form string, Lower = 0 Bit DUAL.TO.OS.PATH entry Dual string, exit Os.Path string SINGLE.PATH entry Wild string, exit Path string, More Bit SINGLE.DIRECTORY entry Wild string, exit Path string, More Bit SINGLE.EXECUTABLE entry Wild string, exit Path string, More Bit SINGLE.FILE entry Wild string, exit Path string, More Bit SINGLE.TEXT entry Wild string, exit Path string, More Bit FORM.PATH.NAME change Path string, entry Element = 0 Directory.Member FORM.PATH.SIZE change Path string, entry Size parcel, exit Truncate Bit, entry Retain = 0 Bit FORM.DUAL.WILD entry Dual string, exit Wild string DUAL.ABSOLUTE entry Dual string, Root string, exit Path string