Code: Select all
; SetFileDate Linux
File.s = GetTemporaryDirectory()+"Test.txt"
CreateFile(0, File)
CloseFile(0)
Debug FormatDate("%yyyy/%mm/%dd %hh:%ii:%ss", GetFileDate(File, #PB_Date_Created))
Debug FormatDate("%yyyy/%mm/%dd %hh:%ii:%ss", GetFileDate(File, #PB_Date_Modified))
Debug FormatDate("%yyyy/%mm/%dd %hh:%ii:%ss", GetFileDate(File, #PB_Date_Accessed))
date=Date(2024,2,13,14,15,16)
SetFileDate(File, #PB_Date_Modified, date)
Debug FormatDate("%yyyy/%mm/%dd %hh:%ii:%ss", GetFileDate(File, #PB_Date_Created))
Debug FormatDate("%yyyy/%mm/%dd %hh:%ii:%ss", GetFileDate(File, #PB_Date_Modified))
Debug FormatDate("%yyyy/%mm/%dd %hh:%ii:%ss", GetFileDate(File, #PB_Date_Accessed))
SetFileDate(File, #PB_Date_Created, date)
Debug FormatDate("%yyyy/%mm/%dd %hh:%ii:%ss", GetFileDate(File, #PB_Date_Created))
Debug FormatDate("%yyyy/%mm/%dd %hh:%ii:%ss", GetFileDate(File, #PB_Date_Modified))
Debug FormatDate("%yyyy/%mm/%dd %hh:%ii:%ss", GetFileDate(File, #PB_Date_Accessed))
SetFileDate(File, #PB_Date_Accessed, date)
Debug FormatDate("%yyyy/%mm/%dd %hh:%ii:%ss", GetFileDate(File, #PB_Date_Created))
Debug FormatDate("%yyyy/%mm/%dd %hh:%ii:%ss", GetFileDate(File, #PB_Date_Modified))
Debug FormatDate("%yyyy/%mm/%dd %hh:%ii:%ss", GetFileDate(File, #PB_Date_Accessed))
; 2024/02/12 23:14:50
; 2024/02/12 23:14:50
; 1970/01/01 00:00:00
; 2024/02/13 14:15:16
; 2024/02/13 14:15:16
; 1970/01/01 00:00:00
; 1970/01/01 00:00:00
; 1970/01/01 00:00:00
; 1970/01/01 00:00:00
; 1970/01/01 00:00:00
; 1970/01/01 00:00:00
; 1970/01/01 00:00:00