Q
qwert8008
Unregistered / Unconfirmed
GUEST, unregistred user!
下面代码中1、if (SearchRec.Attr and faDirectory = 0) or (SearchRec.Name<>'.') and (SearchRec.Name<>'..')这一句什么意思2、if ((SearchRec.Attr and faDirectory) <> 0) and (SearchRec.Name<>'.') and (SearchRec.Name<>'..') thenRFindFile(Folder + SearchRec.Name + '/'); 这一句什么意思 3、代码最后的这段代码什么意思???begintryspec := ExtractFileName(filespec);RFindFile(ExtractFilePath(filespec));Exceptraise;end;end;procedure findfile(const FileSpec: TFileName;attributes:integer;doit: string);varSpec: String;filehandle:integer;procedure RFindFile(const Folder: TFileName);varSearchRec: TSearchRec;beginif doit='0' thenexitelsebeginif FindFirst(Folder + Spec, Attributes, SearchRec)=0 thenbegintryrepeatif (SearchRec.Attr and faDirectory = 0) or (SearchRec.Name<>'.') and (SearchRec.Name<>'..') thenbeginif doit='1' thenbeginif ...... thenbegin......end;endelseif doit='2' thenbeginif ......endelseif doit='3' thenbegin.......begin.......end;end;end;until FindNext(SearchRec) <> 0;exceptraise;end;end;if FindFirst(Folder + '*', Attributes Or faDirectory, SearchRec) = 0 thenbegintryrepeatif ((SearchRec.Attr and faDirectory) <> 0) and (SearchRec.Name<>'.') and (SearchRec.Name<>'..') thenRFindFile(Folder + SearchRec.Name + '/');until FindNext(SearchRec) <> 0;exceptraise;end;end;end;end;begintryspec := ExtractFileName(filespec);RFindFile(ExtractFilePath(filespec));Exceptraise;end;end;