Recent

Author Topic: Get the file creation time and date under Raspbian Linux.  (Read 1730 times)

pascalbythree

  • Jr. Member
  • **
  • Posts: 80
Get the file creation time and date under Raspbian Linux.
« on: October 12, 2021, 12:55:05 pm »
Hey does anybody know how to read the file creation date and time from a file to a TDateTime ?

Maybe i need the file change date later on.

On linux.

It is ment to poll in a loop to see if a .hex file is changed and then start avrdude with the filename.

also when its overwritten.

PS: i did try some default functions, but does not seem to be sufficiant
« Last Edit: October 12, 2021, 12:56:56 pm by pascalbythree »

MarkMLl

  • Hero Member
  • *****
  • Posts: 3501
Re: Get the file creation time and date under Raspbian Linux.
« Reply #1 on: October 12, 2021, 01:15:12 pm »
Look up fpStat() and fpFStat() in BaseUnix.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

Kays

  • Sr. Member
  • ****
  • Posts: 382
  • Whasup!?
    • KaiBurghardt.de
Re: Get the file creation time and date under Raspbian Linux.
« Reply #2 on: October 12, 2021, 02:12:47 pm »
It is ment to poll in a loop to see if a .hex file is changed and then start avrdude with the filename.
The clean solution would be use inotify(7). See also a demo in the wiki.
Yours Sincerely
Kai Burghardt

pascalbythree

  • Jr. Member
  • **
  • Posts: 80
Re: Get the file creation time and date under Raspbian Linux.
« Reply #3 on: October 12, 2021, 02:39:21 pm »
It got to work! thank you all for the help so far!

Now i am going to work on starting the fpc exe on automatic login prompt. in SH.

MarkMLl

  • Hero Member
  • *****
  • Posts: 3501
Re: Get the file creation time and date under Raspbian Linux.
« Reply #4 on: October 12, 2021, 02:57:54 pm »
It got to work! thank you all for the help so far!

Now i am going to work on starting the fpc exe on automatic login prompt. in SH.

Watch it: you're not running SH and almost certainly aren't running sh either :-)

Different shells use different startup scripts at different times: you're probably running either Bash or Dash so /probably/ need to look at ~/.bashrc

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

 

TinyPortal © 2005-2018