Page 1 of 1
FileSize Function And Extended Paths
Posted: Sat Mar 30, 2024 7:07 am
by rmgregory243
In PureBasic 6.10 LTS beta 9 (Windows - x64), the FileSize function returns incorrect results when given a valid filename beginning with "\\?\".
Re: FileSize Function And Extended Paths
Posted: Sat Mar 30, 2024 9:31 am
by jacdelad
? is not a valid character for filenames.
Re: FileSize Function And Extended Paths
Posted: Sat Mar 30, 2024 9:41 am
by STARGĂ…TE
jacdelad wrote: Sat Mar 30, 2024 9:31 am
? is not a valid character for filenames.
Extended-length path notation \\?\
@rmgregory243: I think it is not supported by the Pure Basic function.
Re: FileSize Function And Extended Paths
Posted: Sat Mar 30, 2024 9:49 am
by jacdelad
Oh sorry, didn't know that. That's totally new for me.
Re: FileSize Function And Extended Paths
Posted: Sat Mar 30, 2024 2:10 pm
by breeze4me
I tested it with a few files and it seems to work fine for local disk files.
Note that the return value is a quad type.
Tested with 6.10 LTS x64/x86.
Code: Select all
sz.q = FileSize("\\?\Z:\test.txt")
Re: FileSize Function And Extended Paths
Posted: Sat Mar 30, 2024 4:17 pm
by Quin
Same results as Breeze4Me. I tried \\?\c:\test.txt, \\?\c:\games\test.txt, and \\?\c:\games, all seemingly worked as expected.
Re: FileSize Function And Extended Paths
Posted: Wed Apr 17, 2024 9:42 am
by Fred
Works here as well, do you have any more information ?