OpenBSD::MkTemp(3p) Perl Programmers Reference Guide OpenBSD::MkTemp(3p) #
OpenBSD::MkTemp(3p) Perl Programmers Reference Guide OpenBSD::MkTemp(3p)
NNAAMMEE #
OpenBSD::MkTemp - Perl access to mkstemps() and mkdtemp()
SSYYNNOOPPSSIISS #
use OpenBSD::MkTemp;
my($fh, $file) = mkstemp("/tmp/fooXXXXXXXXXX");
use OpenBSD::MkTemp qw(mkdtemp mkstemps);
my $dir_name = mkdtemp("/tmp/dirXXXXXXXXXX");
my ($fh, $file) = mkstemps("/tmp/fileXXXXXXXXXX", ".tmp");
DDEESSCCRRIIPPTTIIOONN #
This module provides routines for creating files and directories with
guaranteed unique names, using the C mmkksstteemmppss(()) and mmkkddtteemmpp(()) routines.
mmkksstteemmpp(()) and mmkksstteemmppss(()) must be called with a template argument that is
writable, so that they can update it with the path of the generated file.
They return normal perl IO handles.
mmkkddtteemmpp(()) simply takes the template and returns the path of the newly
created directory.
EEXXPPOORRTT #
$fh = mkstemp($template)
EExxppoorrttaabbllee ffuunnccttiioonnss $fh = mkstemps($template, $suffix_len) $dir = mkdtemp($template);
SSEEEE AALLSSOO #
mmkksstteemmpp(3)
AAUUTTHHOORR #
Philip Guenther, <guenther@openbsd.org>
CCOOPPYYRRIIGGHHTT AANNDD LLIICCEENNSSEE #
Copyright (C) 2010 by Philip Guenther
This library is free software; you can redistribute it and/or modify it
under the same terms as Perl itself, either Perl version 5.12.2 or, at
your option, any later version of Perl 5 you may have available.
perl v5.36.3 2016-05-08 OpenBSD::MkTemp(3p)