Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EXPath File Module: temporary files: $prefix and $suffix #136

Open
michaelhkay opened this issue Apr 13, 2022 · 4 comments
Open

EXPath File Module: temporary files: $prefix and $suffix #136

michaelhkay opened this issue Apr 13, 2022 · 4 comments
Assignees

Comments

@michaelhkay
Copy link
Member

The specifications for file:create-temp-file and file:create-temp-dir have arguments $prefix and $suffix, but the specifications says nothing about them. It appears to be the intent that the temporary files/directories that are created should have names beginning and ending with the supplied $prefix and $suffix. But the tests don't actually seem to require that.

@fgeorges
Copy link
Member

Yes, it seems that way. @ChristianGruen, it seems they were introduced in c61e21d, so I assign it to you.

@ChristianGruen
Copy link
Member

Right, the spec is too inaccurate here. The prefix/suffix parameters have been a remnant of an early stage of the spec before I jumped in. I’m not sure if anyone requires them (well, too late).

@adamretter
Copy link
Member

Could I add that the $prefix and $suffix look very similar to those arguments which are available in the JDK NIO for creating temp files, see: https://docs.oracle.com/javase/8/docs/api/java/nio/file/Files.html#createTempFile-java.nio.file.Path-java.lang.String-java.lang.String-java.nio.file.attribute.FileAttribute...-

I am not saying that they should or should not be in the spec. Personally I have found them useful in the past, but I could live without them also.

@ChristianGruen
Copy link
Member

Good to hear that there's some use for it, Adam. If there'll be a version 2 of the spec, I’m sure we'll keep it backward compatible.

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

No branches or pull requests

4 participants