xref: /inferno-os/module/filepat.m (revision 46439007cf417cbd9ac8049bb4122c890097a0fa)
1*46439007SCharles.ForsythFilepat: module
2*46439007SCharles.Forsyth{
3*46439007SCharles.Forsyth	PATH:	con "/dis/lib/filepat.dis";
4*46439007SCharles.Forsyth
5*46439007SCharles.Forsyth	# Turn file name with * ? [] into list of files.  Slashes are significant.
6*46439007SCharles.Forsyth	expand:	fn(pat: string): list of string;
7*46439007SCharles.Forsyth
8*46439007SCharles.Forsyth	# See if file name matches pattern; slashes not treated specially.
9*46439007SCharles.Forsyth	match:	fn(pat, name: string): int;
10*46439007SCharles.Forsyth};
11