pre cutover push

This commit is contained in:
Infineon\StieberD
2024-09-04 20:33:41 -07:00
parent 6ea6969f4b
commit 7762b129af
2072 changed files with 130000 additions and 95295 deletions

View File

@ -29,7 +29,7 @@ $insert SERVICE_SETUP
$insert LOGICAL
$insert FILE_SERVICES_EQUATES
Declare function SRPWinAPI_CreateFile, SRPWinAPI_GetFileSize, SRPWinAPI_CopyFile
Declare function SRPWinAPI_CreateFile, SRPWinAPI_GetFileSize, SRPWinAPI_CopyFile, Direxists, DirList, SRP_Datetime, Dir
Declare subroutine SRPWinAPI_CloseHandle
GoToService else
@ -107,6 +107,47 @@ Service CheckFileExtension(FilePath, ExpectedExtension)
end
end service
Service GetDirFileCount(Dir)
Response = 0
If dir NE '' then
If DirExists(Dir) then
InitDir Dir:'\*.*'
FileList = DirList()
Response = DCount(FileList, @FM)
end else
Error_Services('Add', 'Error in File_Services -> GetDirFileCount: Directory does not exist.')
end
end else
Error_Services('Add', 'Error in File_Services -> GetDirFileCount: No directory specified.')
end
end service
Service GetDirOldestFileDate(Dir)
Response = ''
If dir NE '' then
If DirExists(Dir) then
InitDir Dir:'\*.*'
FileList = DirList()
OldestFileDate = ''
for each File in FileList using @FM
If File NE '' then
FilePath = Dir : '\' : File
FileInfo = Dir(FilePath)
FileDate = FileInfo<2>
FileTime = FileInfo<3>
FileDTM = SRP_Datetime('Combine', FileDate, FileTime)
If FileDTM LT OldestFileDate OR OldestFileDate EQ '' then OldestFileDate = FileDTM
end
Next File
Response = OldestFileDate
end else
Error_Services('Add', 'Error in File_Services -> GetDirOldestFileDate: Directory does not exist.')
end
end else
Error_Services('Add', 'Error in File_Services -> GetDirOldestFileDate: No directory specified.')
end
end service