[m-rev.] [PATCH] Improve Mercury's temporary files and directories predicates.
Paul Bone
paul at bone.id.au
Fri Apr 15 16:12:02 AEST 2016
On Fri, Apr 15, 2016 at 03:36:30PM +1000, Julien Fischer wrote:
>
> Hi Paul,
>
> This change breaks backwards compatibility in the Java grade.
>
> On Wed, 13 Apr 2016, Paul Bone wrote:
>
> >+ Add support for retriving the system/user's temporary directory.
> >+ Add support for creating temporary directories.
> >
> >library/io.m:
> > Add temp_directory/3
> >
> > Add make_temp_directory/3 and make_temp_directory/5.
> >
> > make_temp_file/3 and make_temp_file/5 now return the full pathname on
> > the Java backends.
> >
> >+import java.io.File;
> >+import java.nio.file.Files;
> >+import java.nio.file.Path;
> >+import java.nio.file.Paths;
> >+import java.nio.file.attribute.PosixFilePermissions;
> >").
>
> The java.nio.file package is only available since Java 1.7. The
> documentation in README.Java currently says Java 1.5 or later are
> supported. Furthermore, we (i.e. Opturion) still need to support Java
> 1.6.
Okay, I think what we may loose in that case is the security that temporary
files and directories will be created with mode 600.
I'll fix it up. All we (YesLogic) really need is get_temp_directory. So
that's easy to support without the other stuff, I simply got distracted :-/
--
Paul Bone
More information about the reviews
mailing list