Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
OpenXPKI::FileUtils(3)User Contributed Perl DocumentatioOpenXPKI::FileUtils(3)

   get_tmp_handle
       Create a	temporary file and return the object handle of it.  The	return
       value can be used in string context to get the name of the directory
       created.	The handle will	be held	open by	the class so it	will stay in
       the filesystem until the	class is destroyed.

   get_tmp_dir
       Create a	temporary directory and	return the object handle of it.	 The
       return value can	be used	in string context to get the name of the
       directory created. The handle will be held open by the class so it will
       stay in the filesystem until the	class is destroyed.

   write_temp_file
       Expects the content to write as argument. Creates a temporary file
       handle using get_tmp_handle and writes the data to it. The filehandle
       is closed and the name of the file is returned.

Name
       OpenXPKI	- base module for all OpenXPKI core modules.

Exported functions
       Exported	function are function which can	be imported by every other
       object. These function are exported to enforce a	common behaviour of
       all OpenXPKI modules for	debugging and error handling.

       "use OpenXPKI::API qw (debug);"

   debug
       You should call the function in the following way:

       "$self->debug ("help: $help");"

       All other stuff is generated fully automatically	by the debug function.

Functions
   read_file
       Example:	$self->read_file($filename);

   write_file
       Example:	$self->write_file (FILENAME => $filename, CONTENT => $data);

       The method will raise an	exception if the file already exists unless
       the optional argument FORCE is set. In this case	the method will
       overwrite the specified file.

       Example:	$self->write_file (FILENAME => $filename, CONTENT => $data,
       FORCE =>	1);

   get_safe_tmpfile
       Example:	my $file = $self->get_safe_tmpfile ({TMP => "/tmp"});

       This method creates a safe temporary file and returns the filename.

   get_safe_tmpdir
       Example:	my $dir	= $self->get_tmpdir ({TMP => "/tmp"});

       This method creates a safe temporary directory and returns the path to
       it.

perl v5.32.1			  2021-03-01		OpenXPKI::FileUtils(3)

Name | Exported functions | Functions

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=OpenXPKI::FileUtils&sektion=3&manpath=FreeBSD+13.0-RELEASE+and+Ports>

home | help