Sender: |
|
Date: |
Fri, 28 Jul 2023 15:48:40 -0300 |
Reply-To: |
|
Message-ID: |
|
Subject: |
|
MIME-Version: |
1.0 |
Content-Transfer-Encoding: |
quoted-printable |
In-Reply-To: |
|
Content-Type: |
text/plain; charset="UTF-8" |
From: |
|
Parts/Attachments: |
|
|
On Fri, Jul 28, 2023 at 3:16 PM LARONDE Thierry <[log in to unmask]> wrote:
>
> I simply thought about the feature: when wanting the size, it can
> be for whatever file. Adding automatically an extension was
> preventing from obtaining the size of a file without an extension and
> this was not giving the size of the file as specified (being partly
> specified, not absolute was not a problem; changing the filename was).
> This was stupid to not be able to obtain the size of a filename
> without extension or to alter the filename. So I didn't implement
> it this way but, contrary to the others, I tried to described
> precisely what the implementation was doing so that somebody reading
> the description would have an accurate description of the behavior.
If I'm not mistaken, the behaviour for file lookup (regardless which
primitive) is (crappy pseudocode warning):
If Exists(file name)
Return 0 % file found
Else
If ContainsExtension(file name)
Return 1 % not found
Else
If Exists(file name + ".tex")
Return 0 % file found
Else
Return 1 % not found
Endif
Endif
Endif
So it /is/ possible to use |\filesize| or |\input| or... on a file
without extension, because the lookup first checks the name as given.
If that name is not found, and only if the file name doesn't have an
extension (i.e., a "." after the last "/"), then that name is tried with
".tex" appended to it. It's been a while, so that may not be 100%
correct, but I'm pretty sure it's possible to use extensionless files.
Best,
Phelype
|
|
|