{$IFDEF WIN32} {$I DEFINES.INC} {$ENDIF} {$A+,B-,D+,E-,F+,I-,L+,N-,O+,R-,S+,V-} UNIT File9; INTERFACE USES Common; PROCEDURE DosDir(CurDir: ASTR; CONST FSpec: Str12; Expanded: Boolean); PROCEDURE DirF(Expanded: Boolean); PROCEDURE DeleteFF(F: FileInfoRecordType; RN: Integer); PROCEDURE ToggleFileAreaScanFlags; PROCEDURE SetFileAreaNewScanDate; IMPLEMENTATION USES Dos, Common5, File0, File1, TimeFunc; PROCEDURE DosDir(CurDir: ASTR; CONST FSpec: Str12; Expanded: Boolean); VAR (* DirInfo: SearchRec; *) DT: DateTime; TempStr: ASTR; AmPm: Str2; Online: Byte; NumFiles, NumDirs, BytesUsed: LongInt; BEGIN CurDir := BSlash(CurDir,TRUE); Abort := FALSE; Next := FALSE; FindFirst(CurDir[1]+':\*.*',VolumeID,DirInfo); IF (DOSError <> 0) THEN TempStr := 'has no label.' ELSE TempStr := 'is '+DirInfo.Name; PrintACR(' Volume in drive '+UpCase(CurDir[1])+' '+TempStr); (* Add Serial Number if possible *) NL; PrintACR(' Directory of '+CurDir); NL; TempStr := ''; Online := 0; NumFiles := 0; NumDirs := 0; BytesUsed := 0; CurDir := CurDir + FSpec; FindFirst(CurDir,AnyFile,DirInfo); WHILE (DOSError = 0) AND (NOT Abort) AND (NOT HangUp) DO BEGIN IF (NOT (DirInfo.Attr AND Directory = Directory)) OR (FileSysOp) THEN IF (NOT (DirInfo.Attr AND VolumeID = VolumeID)) THEN IF ((NOT (DirInfo.Attr AND DOS.Hidden = DOS.Hidden)) OR (UserNum = 1)) THEN IF ((DirInfo.Attr AND DOS.Hidden = DOS.Hidden) AND (NOT (DirInfo.Attr AND Directory = Directory))) OR (NOT (DirInfo.Attr AND DOS.Hidden = DOS.Hidden)) THEN BEGIN IF (Expanded) THEN BEGIN UnPackTime(DirInfo.Time,DT); ConvertAmPm(DT.Hour,AmPm); TempStr := ZeroPad(IntToStr(DT.Month))+ '/'+ZeroPad(IntToStr(DT.Day))+ '/'+IntToStr(DT.Year)+ ' '+ZeroPad(IntToStr(DT.Hour))+ ':'+ZeroPad(IntToStr(DT.Min))+ AmPm[1]; END; IF ((DirInfo.Attr AND Directory) = Directory) THEN BEGIN TempStr := TempStr+PadRightStr('