FileSize Function And Extended Paths
-
rmgregory243
- New User

- Posts: 4
- Joined: Tue Jul 19, 2022 10:11 am
FileSize Function And Extended Paths
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
? is not a valid character for filenames.
Good morning, that's a nice tnetennba!
PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
Re: FileSize Function And Extended Paths
Extended-length path notation \\?\
@rmgregory243: I think it is not supported by the Pure Basic function.
PB 6.01 ― Win 10, 21H2 ― Ryzen 9 3900X, 32 GB ― NVIDIA GeForce RTX 3080 ― Vivaldi 6.0 ― www.unionbytes.de
Lizard - Script language for symbolic calculations and more ― Typeface - Sprite-based font include/module
Lizard - Script language for symbolic calculations and more ― Typeface - Sprite-based font include/module
Re: FileSize Function And Extended Paths
Oh sorry, didn't know that. That's totally new for me.
Good morning, that's a nice tnetennba!
PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
Re: FileSize Function And Extended Paths
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.
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
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
Works here as well, do you have any more information ?


