To string OnlyExtension
-
Something strange here.
This gives an error (constant not found)
const f = FileSystem.getFolder(FileSystem.Downloads); Console.print(f.toString(f.OnlyExtension));
But this doesn't
const f = FileSystem.getFolder(FileSystem.Downloads); Console.print(f.toString(f.Extension));
But the docs say to use
OnlyExtension
. I had a look in the source code and that leads to confusion.addConstant("FullPath", (int)FullPath); addConstant("NoExtension", (int)NoExtension); addConstant("Extension", (int)OnlyExtension); addConstant("Filename", (int)Filename);
-
@d-healey Yeah I always use 0,1,2,3 instead now I remember them...
-
@ustk yeah I'm a numbers guy on this one too-it never seems to work for me to use the constants
-
The constants work fine, and make it easier to understand the code. The only issue I've had is this mismatch between the docs and the actual working constant.
The constants are part of the file object so you have to do something like this.
Console.print(myFile.toString(myFile.FullPath));
-
@d-healey yep -well aware of how its supposed to work....I think its just history for me - habit formed when it didnt work,,,
-
@Christoph-Hart Can we get a fix for this? I keep falling in this hole.