You are not logged in.

  • "Kleber Santana" started this thread

Posts: 2

Date of registration: Mar 9th 2012

  • Send private message

1

Thursday, March 29th 2012, 3:14pm

FileDateTime Function

Hey there,

Is there something similar like FileDateTime from VB in Jabaco?

i'd like to identify when a file was modified. Thank you for your attention.

Dim dtCriacao As Date
dtCriacao = FileDateTime("path")

theuserbl

Intermediate

Posts: 436

Date of registration: Dec 20th 2008

  • Send private message

2

Saturday, March 31st 2012, 2:46pm

RE: FileDateTime Function

Sadly, I am currently so busy in my job. So I haven't the time to integrate it in FileSystem.jsrc.

But for the moment here an implementation, you can use in your program:

Jabaco Source

1
2
3
4
5
6
Public Function FileDateTime(path As String) As Date
  Dim file As New java#io#File(path)
  Dim modifiedTime As Long = file.lastModified()
  Dim myDate As Date = New Date(modifiedTime)
  FileDateTime = myDate  
End Function


Greatings
theuserbl

  • "Kleber Santana" started this thread

Posts: 2

Date of registration: Mar 9th 2012

  • Send private message

3

Monday, April 2nd 2012, 4:08pm

RE: FileDateTime Function

theuserbl,

Great! It's working now. Thanks a lot!

Best Regards,
Kleber Santana

This post has been edited 1 times, last edit by "Kleber Santana" (Apr 2nd 2012, 4:17pm)


Rate this thread
WoltLab Burning Board