Hello FRED
Fred wrote: Mon Jun 03, 2024 9:11 am
such files are usually hidden files name, which are not really extension only.
Yes you have right, but here it's not really the subject, hidden or not, it's a normal file, he have not name but have a real extension like others, then why it not treaty like the others ?
It's a "tProject" extension of TIZEN, so an extension not a name, and furthermore it's not an hidden file
I have talk about ".tproject", but beside there are a ".project" file not hidden too, and surely numerous files not hidden exist in all the applications of the world
Fred wrote:We could add to GetExtensionPart() and GetFilePart() than a filename starting with a dot '.' (like .htaccess) is considered as a filename and not as an extension as these kind of name are very commonly used to design 'hidden' files
We cannot change a rule, the fault of another parameter exist

we'll never get out of this

As we would say in France "If my mother had them, it would be my father" or in more politically correct, "With several IF, we would remake the world"
It surprises me a little about you, because you are always implacably logical and rigorous.
Perhaps the solution, is adding a style of parameter like
#PB_FileSystem_StrictExtension for be sure a file "a.txt" give the same result than ".txt"
Instead of write this style of KCC cow pat
Code: Select all
Procedure.s GetExtensionPartEx(File.s)
Name$ = GetFilePart(File)
Extension$ = GetExtensionPart(File)
If Trim(Extension$) = "" And Left(Name$, 1) = "."
Extension$ = Mid(Name$, 2)
EndIf
ProcedureReturn Extension$
EndProcedure
Debug GetExtensionPartEx("X:\A\A\B\A\B\GTI\A\.txt")
It's when even a problem when a function not return the same thing according to the attribute of an object, no ???

Especially here, where it's more of a writing convention than anything else, so why bring in attributes that have nothing to see with the sauerkraut (French expression)
This is precisely the strength of PB, the stability in the results of his functions
And that...as someone we know well, would say :
“Whatever it costs” 