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

FreeBSD Manual Pages

  
 
  

home | help
Sympa::Tools::File(3Sympa)	 sympa 6.2.16	    Sympa::Tools::File(3Sympa)

NAME
       Sympa::Tools::File - File-related functions

DESCRIPTION
       This package provides some file-related functions.

   Functions
       set_file_rights(%parameters)
	   Sets	owner and/or access rights on a	file.

	   Returns true	value if setting rights	succeeded.  Otherwise returns
	   false value.

	   Note: If superuser was specified as owner, this function will die.

       copy_dir($dir1, $dir2)
	   Copy	a directory and	its content

       del_dir($dir)
	   Delete a directory and its content

       mk_parent_dir($file)
	   To be used before creating a	file in	a directory that may not exist
	   already.

       mkdir_all($path,	$mode)
	   Recursively create directory	and all	parent directories

       shift_file($file, $count)
	   Shift file renaming it with date. If	count is defined, keep $count
	   file	and unlink others

       get_mtime ( $file )
	   Gets	modification time of the file.

	   Parameter:

	   $file
	       Full path of file.

	   Returns:

	   Modification	time as	UNIX time.  If the file	is not found
	   (including the case that the	file vanishes during execution of this
	   function) or	is not readable, returns "POSIX::INT_MIN".  In case of
	   other error,	returns	"undef".

       list_dir($dir, $all, $original_encoding)
	   Recursively list the	content	of a directory Return an array of
	   hash, each entry with directory + filename +	encoding

       get_dir_size($dir)
	   TBD.

       qencode_hierarchy()
	   Q-encodes a complete	file hierarchy.	 Useful	to Q-encode subshared
	   documents.

	   ToDo: See a comment on "qencode_filename" in	Sympa::Tools::Text.

       remove_dir(@directories)
	   Function for	Removing a non-empty directory.	 It takes a variale
	   number of arguments:	It can be a list of directory or few direcoty
	   paths.

HISTORY
       Sympa::Tools::File appeared on Sympa 6.2a.41.

6.2.16				  2016-02-23	    Sympa::Tools::File(3Sympa)

NAME | DESCRIPTION | HISTORY

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

home | help