procedure CreateThreadDat(Board: TBoard);
procedure WriteThreadDat(Board: TBoard);
function ParseIndexLine(Line: string): TIndexRec;
- procedure GetFileList(Path: string; Mask: string; var List: TStringList; SubDir: Boolean; IsPathAdd: Boolean);
+ procedure GetFileList(Path: string; Mask: string; var List: TStringList; SubDir: Boolean; IsPathAdd: Boolean); overload;
+ procedure GetFileList(Path: string; Mask: string; var List: TStringList; IsPathAdd: Boolean); overload;//\83T\83u\83t\83H\83\8b\83_\82Í\8c\9f\8dõ\82µ\82È\82¢
procedure GetDirectoryList(Path: string; Mask: string; List: TStringList; SubDir: Boolean);
procedure CreateHTML2(doc: Variant; ThreadItem: TThreadItem; var sTitle: string);
begin
d1 := EncodeDate(1970, 1, 1);
d2 := aDate - EncodeTime(9, 0, 0, 0);
- Result := FloatToStr(Trunc((d2 - d1) * 24 * 60 * 60));
+ //Result := FloatToStr(Trunc((d2 - d1) * 24 * 60 * 60));
+ Result := FloatToStr(Trunc((d2 - d1) * 86400));
end;
RoundItem: TRoundItem;
idx: Integer;
usePlugIn : Boolean;
- tmpStr: string;
+ tmpStr: string;
begin
if Board.IsThreadDatRead then
Exit;
TmpFileList.Sorted := True;
//IsLogFile\97pDAT\83t\83@\83C\83\8b\83\8a\83X\83g
- GetFileList(ExtractFileDir(Board.GetFolderIndexFileName), '*.dat', FileList, False, False);
+ //GetFileList(ExtractFileDir(Board.GetFolderIndexFileName), '*.dat', FileList, False, False);
+ GetFileList(ExtractFileDir(Board.GetFolderIndexFileName), '*.dat', FileList, False);
//\91O\89ñ\88Ù\8fí\8fI\97¹\8e\9e\97pTmp\83t\83@\83C\83\8b\83\8a\83X\83g
- GetFileList(ExtractFileDir(Board.GetFolderIndexFileName), '*.tmp', TmpFileList, False, False);
+ //GetFileList(ExtractFileDir(Board.GetFolderIndexFileName), '*.tmp', TmpFileList, False, False);
+ GetFileList(ExtractFileDir(Board.GetFolderIndexFileName), '*.tmp', TmpFileList, False);
// \8fd\95¡\82ð\96h\82®
Board.BeginUpdate;
sl := TStringList.Create;
TmpFileList := TStringList.Create;
try
- GetFileList(ExtractFileDir(Board.GetFolderIndexFileName), '*.tmp', TmpFileList, False, true);
+ //GetFileList(ExtractFileDir(Board.GetFolderIndexFileName), '*.tmp', TmpFileList, False, true);
+ GetFileList(ExtractFileDir(Board.GetFolderIndexFileName), '*.tmp', TmpFileList, true);
sl.BeginUpdate;
sl.Add(FOLDER_INDEX_VERSION);
rc: Integer;
SearchRec : TSearchRec;
s: string;
+ maskExt: string;
begin
+ maskExt := Copy(Mask, 1, Length(Mask) - 1);
+
Path := IncludeTrailingPathDelimiter(Path);
rc := FindFirst(Path + '*.*', faAnyfile, SearchRec);
try
// s := IncludeTrailingPathDelimiter(s)
if (SearchRec.Attr and faDirectory = 0) and (MatchesMask(s, Mask)) then
- if IsPathAdd then
- List.Add(s)
- else
- List.Add(SearchRec.Name);
+ //if (SearchRec.Attr and faDirectory = 0) then
+ // if (maskExt = '') or (ChangeFileExt(s, maskExt) = s )then
+ if IsPathAdd then
+ List.Add(s)
+ else
+ List.Add(SearchRec.Name);
if SubDir and (SearchRec.Attr and faDirectory > 0) then
GetFileList(s, Mask, List, True, IsPathAdd);
end;
finally
SysUtils.FindClose(SearchRec);
end;
- List.Sort;
+ List.Sort;
end;
+//\8ew\92è\83t\83H\83\8b\83_\93à\82Ì\8ew\92è\83t\83@\83C\83\8b\88ê\97\97\82ð\8eæ\93¾\82·\82é
+//\83T\83u\83t\83H\83\8b\83_\82Í\8c\9f\8dõ\82µ\82È\82¢
+// ListFiles('c:\', '*.txt', list, True);
+procedure TGikoSys.GetFileList(Path: string; Mask: string; var List: TStringList; IsPathAdd: Boolean);
+var
+ rc: Integer;
+ SearchRec : TSearchRec;
+ s: string;
+begin
+ Path := IncludeTrailingPathDelimiter(Path);
+ rc := FindFirst(Path + Mask, faAnyfile, SearchRec);
+ try
+ while rc = 0 do begin
+ if (SearchRec.Name <> '..') and (SearchRec.Name <> '.') then begin
+ s := Path + SearchRec.Name;
+ if (SearchRec.Attr and faDirectory = 0) then
+ if IsPathAdd then
+ List.Add(s)
+ else
+ List.Add(SearchRec.Name);
+ end;
+ rc := FindNext(SearchRec);
+ end;
+ finally
+ SysUtils.FindClose(SearchRec);
+ end;
+ List.Sort;
+end;
//\8ew\92è\83t\83H\83\8b\83_\93à\82Ì\83f\83B\83\8c\83N\83g\83\8a\88ê\97\97\82ð\8eæ\93¾\82·\82é
procedure TGikoSys.GetDirectoryList(Path: string; Mask: string; List: TStringList; SubDir: Boolean);
var
if DirectoryExists( GikoSys.Setting.GetBoardDir ) then begin
BoardFileList := TStringList.Create;
try
- GikoSys.GetFileList( GikoSys.Setting.GetBoardDir, '*', BoardFileList, True, True );
+ GikoSys.GetFileList( GikoSys.Setting.GetBoardDir, '*', BoardFileList, True, True );
SetLength( BBSs, l + BoardFileList.Count );
for i := BoardFileList.Count - 1 downto 0 do begin
BBSs[ l ] := TBBS.Create( BoardFileList[ i ] );