Skip to content

docs(api): fix tmpfile('f2.txt') example output filename#1493

Open
DevCop95 wants to merge 1 commit into
google:mainfrom
DevCop95:docs/fix-tmpfile-example
Open

docs(api): fix tmpfile('f2.txt') example output filename#1493
DevCop95 wants to merge 1 commit into
google:mainfrom
DevCop95:docs/fix-tmpfile-example

Conversation

@DevCop95

@DevCop95 DevCop95 commented Jul 2, 2026

Copy link
Copy Markdown

What

Fixes the inline comment in the tmpfile() example in docs/api.md.

Before:

f2 = tmpfile('f2.txt')  // /os/based/tmp/zx-1ra1iofojgg/foo.txt

After:

f2 = tmpfile('f2.txt')  // /os/based/tmp/zx-1ra1iofojgg/f2.txt

Why

tmpfile(name) returns path.join(tempdir(), name) (see src/goods.ts), so passing 'f2.txt' yields a path ending in f2.txt, not foo.txt. Verified by running the built function.

Closes #1469

The inline comment showed 'foo.txt' but tmpfile(name) returns
path.join(tempdir(), name), so the result ends with 'f2.txt'.

Closes google#1469
@google-cla

google-cla Bot commented Jul 2, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@DevCop95

DevCop95 commented Jul 2, 2026

Copy link
Copy Markdown
Author

I have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs(api): tmpfile('f2.txt') example shows wrong output filename (foo.txt)

1 participant