Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:120164 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 73399 invoked from network); 30 Apr 2023 07:56:36 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 30 Apr 2023 07:56:36 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 9CD931804D5 for ; Sun, 30 Apr 2023 00:56:35 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-yb1-f174.google.com (mail-yb1-f174.google.com [209.85.219.174]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Sun, 30 Apr 2023 00:56:35 -0700 (PDT) Received: by mail-yb1-f174.google.com with SMTP id 3f1490d57ef6-b8f557b241fso1035440276.0 for ; Sun, 30 Apr 2023 00:56:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682841394; x=1685433394; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=HtytoVHG7EyvcM7ewtY1Cti0xQQdEuq+EcfD7sEy22E=; b=ns4kDqQ6VYJy5TbGB60IS9LcbRZpv7EdN7glwmAUDoRBRC70PsyackuAaRTwjdEzIl FsYdcXtAUDa8ldkgauPqaplQFTbxmGkexiH4Og50f2mQTZqKEWBvjpak/Him5WCJbP4/ aPMflXMaMC80cf4Sq2abic77mLk8wcJUYIRbDATa9yysGK3gfd89MpjV6on5hwCLDhM3 xIgbtc4ZaE/942QxII/ZcecQjbyaEnIdAK3lurEEBRA3pTi8y8K+wi/wTClVYn4TkvIw pv7cwHVqXBUuAKBnYLlljNyKw2LZ/r/n3gDitVmtxOSVMcI1vI5ckS3tDRYEewENr2Kq ifLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682841394; x=1685433394; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HtytoVHG7EyvcM7ewtY1Cti0xQQdEuq+EcfD7sEy22E=; b=OQ4XcmhMaPbHx2u87VCCPYL33Yt2fgrAsOV6tRpnvAm9xDsRABvpf8W4Y4UaSRrLoV O3Wk+RXOi0hMCuvvWokMM7RYruhezgK5S0Yi51PeH7Ai8ApIca2mgYOxgEvVFb0Jr9r+ vKjcPdZSE+opnQUgov10FCv/G1CxOlAZyBsn/LLyoVL/q/QUnxY+etBvgUWBDYDigGQS eaF0VRpNDE2GnIkc/l6l/merL7H2rSMf/Ks4atCHB5ar//0VRQ+24hliKL3NhUo0OaHE dWGXB6cPLQFtYAGBB9IpdCUaYGGgmlO6Wo1RCkd1SNFikFZRQuGNLZx/Kj4YH5JwwQMb 98Vw== X-Gm-Message-State: AC+VfDyYptJ0b9fpQ5Q0HgY7NvDMQq0zGyPxsb8Twu9jkwkWW1E+gwsn I9+DbmjTNqMmJa96S3gDIg4u7oloxcP1eCRY7TvKOVLFEVTtjA== X-Google-Smtp-Source: ACHHUZ6+fd9ewRApVKYKwFhnI1eAmmFPDyooky8Cb0vIwunOup+5krzwE55CDgLpwvhUYlaBWoPAIRsnkilOtHn8hWg= X-Received: by 2002:a0d:f344:0:b0:541:6a0a:9676 with SMTP id c65-20020a0df344000000b005416a0a9676mr7731636ywf.48.1682841394368; Sun, 30 Apr 2023 00:56:34 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Sun, 30 Apr 2023 09:55:58 +0200 Message-ID: To: Robert Landers Cc: Dan Liebner , PHP Internals Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Moving a tmpfile()? From: divinity76@gmail.com (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 original path on cleanup, and don't keep track of renames/movings) On Sat, 29 Apr 2023 at 14:56, Robert Landers wro= te: > > On Sat, Apr 29, 2023 at 9:33=E2=80=AFAM 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 dele= ted > > after being moved and the file handle closed. > > > > Thanks, > > Dan > > I suspect it depends on the OS. For example, in Linux, you can delete > a file you are writing to without issues, but you cannot in Windows. > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: https://www.php.net/unsub.php >