Re: [PHP-DEV] Moving a tmpfile()?

2023-05-07 Thread Hans Krentel via internals
On Sunday 07 May 2023 02:30:13 (+02:00), Dan Liebner wrote: > > Why move the temporary file when it is already a temporary file, right? > > If you don't want to have to write the file again with a copy? Then why create a temporary file first? ^^ Nevertheless, a fair point it seems, and t

Re: [PHP-DEV] Moving a tmpfile()?

2023-05-06 Thread Dan Liebner
> Why move the temporary file when it is already a temporary file, right? If you don't want to have to write the file again with a copy? On Sat, May 6, 2023 at 1:56 PM Hans Krentel wrote: > > > > On Saturday 29 April 2023 09:32:42 (+02:00), Dan Liebner wrote: > > > Are there any inherent probl

Re: [PHP-DEV] Moving a tmpfile()?

2023-05-06 Thread Hans Krentel via internals
On Saturday 29 April 2023 09:32:42 (+02:00), Dan Liebner wrote: > Are there any inherent problems with moving a file created with tmpfile()? > > In practice, it seems that it can be done and the file will not be deleted > after being moved and the file handle closed. yes, not that it wou

Re: [PHP-DEV] Moving a tmpfile()?

2023-04-30 Thread Hans Henrik Bergan
@Robert I know windows has problems with moving files that are opened by other processes, BUT this still works fine on Windows 10 running on NTFS: rename returns true and the file really is moved (and the file is no longer automatically deleted - i suspect PHP's tmpfile() try to delete the origina

Re: [PHP-DEV] Moving a tmpfile()?

2023-04-29 Thread Robert Landers
On Sat, Apr 29, 2023 at 9:33 AM Dan Liebner wrote: > > Are there any inherent problems with moving a file created with tmpfile()? > In practice, it seems that it can be done and the file will not be deleted > after being moved and the file handle closed. > > Thanks, > Dan I suspect it depends on

[PHP-DEV] Moving a tmpfile()?

2023-04-29 Thread Dan Liebner
Are there any inherent problems with moving a file created with tmpfile()? In practice, it seems that it can be done and the file will not be deleted after being moved and the file handle closed. Thanks, Dan