webu
Full Member
Posts: 149
|
Post by webu on Mar 10, 2024 23:36:44 GMT 1
As the subject already says, the filetime functions under GFA 32 have had problems since last year with the file time functions of shares that Total Commander can set under Android. With such a share you can read, write, everything that is possible with a network directory. But let's start slowly, so I'll first ask who of you also uses TC ( Total Commander) on Android? play.google.com/store/apps/details?id=com.ghisler.android.TotalCommander---Deutsch---
Wie der Betreff schon sagt, haben die filetime-functions unter GFA 32 seit letztem Jahr Probleme bei File-Zeit-Funktionen von shares, die der Total Commander unter Android setzen kann. Mit so einem share kann man Lesen, Schreiben, alles, was mit einem Netzwerk-Verzeichnis eben so machbar ist. Aber last erst uns langsam anfangen, daher frage ich erst einmal, wer von euch den TC ( Total Commander) auch unter Android nutzt? play.google.com/store/apps/details?id=com.ghisler.android.TotalCommander
|
|
|
Post by (X) on Mar 11, 2024 13:47:51 GMT 1
I do not use TC.
|
|
webu
Full Member
Posts: 149
|
Post by webu on Mar 11, 2024 14:30:37 GMT 1
Total Commander is very old (30 years!) and a very good software for Windows and Android. It is very powerfull and for Android the best file explorer i know. I think, there is no better one for this platform. TC is still maintained. en.wikipedia.org/wiki/Total_Commander
|
|
webu
Full Member
Posts: 149
|
Post by webu on Mar 19, 2024 15:37:05 GMT 1
We are unable to use the native API-function "GetFileTime()", because GFA will use only the own function with this name. And these own routines in turn serve their own GFA routines such as "FileDateTime()" etc.I will give some examples later. My problem is: The windows-Explorer is able to find all times of all files in the network correctly, but GFA delivers at some files a return-time of 0, which means the date 01.01.1601
|
|
|
Post by dragonjim on Mar 19, 2024 17:14:52 GMT 1
Have you tried Declare-ing the API using Alias? This should get round GB32 confusing your API call with the internal one.
|
|
|
Post by (X) on Mar 19, 2024 17:49:54 GMT 1
In the Help Doc we see:
// The same results can be achieved through the FileSystemObject
Global Object f, fs Set fs = CreateObject("Scripting.FileSystemObject") Set f = fs.GetFile(d$)
Print "GfaWin32.exe was created: "; Print f.DateCreated
Print "The last time that GfaWin32.exe was modified or moved was: "; Print f.DateLastModified
Print "The last time that GfaWin32.exe was accessed was: "; Print f.DateLastAccessed
And also: Are these really the same?
|
|
|
Post by (X) on Mar 19, 2024 18:07:01 GMT 1
A 'file time' related utility is the "Touch #<channel number>" statement mentioned in the GB32 Help Doc. There may be some executable utilities that might derive from "Touch #<>" that may "do" the same thing... This is mentioned in Sjouke's Blog: gfabasic32.blogspot.com/search?q=touch(Search for "Touch" to find the exact paragraph.)
|
|
webu
Full Member
Posts: 149
|
Post by webu on Mar 21, 2024 22:33:00 GMT 1
Unfortunately, it did not work to address the API via alias, it kept throwing errors when I tried. You mean this one?
Declare Function GetFileTime_API Lib "kernel32" Alias "GetFileTime" ( _ ByVal hFile As Long, _ lpCreationTime As Large, _ lpLastAccessTime As Large, _ lpLastWriteTime As Large _ ) As Long Declare Function SetFileTime_API Lib "kernel32" Alias "SetFileTime" ( _ ByVal hFile As Long, _ lpCreationTime As Large, _ lpLastAccessTime As Large, _ lpLastWriteTime As Large _ ) As Long
---german---
Es hat leider nicht funktioniert, die API über Alias anzusprechen, sie warf bei meinem Versuch dauernd Fehler. Ihr meint die og., oder'?
|
|
webu
Full Member
Posts: 149
|
Post by webu on Mar 21, 2024 22:49:39 GMT 1
Function get_times(file$) As Long 'z1 to z3 are Large Open file$ for Input As # 1 ret = GetFileTime(_File(# 1), V:z1, V:z2, V:z3) // this is GFA-own and it works for normal file-objekts (not good for mobile-shares mentioned) 'ret = GetFileTime_API(_File(# 1), V:z1, V:z2, V:z3) // this is the alias API-call and don't work, for nothing, returns only 0 Close # 1 Return ret
If the original GetFileTime() of GFA in lpLastWriteTime throws 0, the remaining GFA functions (like FileDateTime()) also throw the usual wrong time from the january 1601, which is calculated for 0. ---german--- Wenn die originale GetFileTime() von GFA in lpLastWriteTime 0 wirft, werfen auch die GFA-eigenen restlichen Funktionen (wie z. B. FileDateTime()) die übliche falsche Zeit aus dem Januar 1601, die für 0 eben errechnet wird.
|
|
|
Post by (X) on Mar 22, 2024 15:03:53 GMT 1
Does this work for you?
$Library "gfawinx" $Library "UpdateRT" UpdateRuntime ' Patches GfaWin23.Ocx
// The same results can be achieved through the FileSystemObject Trace App.Path Trace App.Name
Dim d$ = App.Path & "\" & App.Name & ".g32" d$ = ShortPathName(d$)
Local Object f, fs Set fs = CreateObject("Scripting.FileSystemObject") Set f = fs.GetFile(d$)
Debug Debug d$ Debug "Created: " Debug f.DateCreated
Debug "Modified" Debug f.DateLastModified
Debug "Accessed" Debug f.DateLastAccessed
Do : Sleep : Until Me Is Nothing
Debug:
|
|