Thread overview | ||||||
---|---|---|---|---|---|---|
|
May 11, 2017 struct File. property size. | ||||
---|---|---|---|---|
| ||||
import std.stdio; int main() { auto big = File("bigfile", "r+"); //bigfile size 20 GB writeln(big.size); // ERROR! return 0; } ////////////////////////////////////// std.exception.ErrnoException@std\stdio.d(1029): Could not seek in file `bigfile` (Invalid argument) I can not work with a large file? 32 bit executable. |
May 11, 2017 Re: struct File. property size. | ||||
---|---|---|---|---|
| ||||
Posted in reply to AntonSotov | On Thursday, 11 May 2017 at 07:24:00 UTC, AntonSotov wrote:
> import std.stdio;
>
> int main()
> {
> auto big = File("bigfile", "r+"); //bigfile size 20 GB
> writeln(big.size); // ERROR!
> return 0;
> }
>
> //////////////////////////////////////
> std.exception.ErrnoException@std\stdio.d(1029): Could not seek in file `bigfile` (Invalid argument)
>
> I can not work with a large file?
> 32 bit executable.
it seems you cannot :)
files bigger then 4G are still problematic on many platforms.
|
May 11, 2017 Re: struct File. property size. | ||||
---|---|---|---|---|
| ||||
Posted in reply to AntonSotov | On Thursday, 11 May 2017 at 07:24:00 UTC, AntonSotov wrote:
> import std.stdio;
>
> int main()
> {
> auto big = File("bigfile", "r+"); //bigfile size 20 GB
> writeln(big.size); // ERROR!
> return 0;
> }
>
> //////////////////////////////////////
> std.exception.ErrnoException@std\stdio.d(1029): Could not seek in file `bigfile` (Invalid argument)
>
> I can not work with a large file?
> 32 bit executable.
Are you in windows perchance? IIRC the when compiling for 32 bit it doesn't use the 64 bit C file function so that will not work.
|
May 11, 2017 Re: struct File. property size. | ||||
---|---|---|---|---|
| ||||
Posted in reply to Nicholas Wilson | On Thursday, 11 May 2017 at 08:42:26 UTC, Nicholas Wilson wrote:
> Are you in windows perchance? IIRC the when compiling for 32 bit it doesn't use the 64 bit C file function so that will not work.
Yes, windows. Ok, I understood you.
|
Copyright © 1999-2021 by the D Language Foundation