关于搜寻文件的代码的几个疑问,请解答一下好吗???(50)

  • 主题发起人 主题发起人 qwert8008
  • 开始时间 开始时间
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;
 
这段代码不是干好事的,[:(!],如果我没猜错他应该是某一个病毒的一部分,很简单,但我不会回答。
 
后退
顶部