Sympa::Tools::File(3Sympa)
π Sympa::Tools::File π
okay bestie, welcome to Sympa::Tools::File(3Sympa) β this is the file-handling corner of sympa 6.2.80 and it's honestly giving backstage-pass energy. it's a Perl package, lowercase-manual-name Sympa::Tools::File, and it's where all the little filesystem chores live. π
β¨ NAME β¨
Sympa::Tools::File β File-related functions π¦
πΈ DESCRIPTION πΈ
So basically this package is a grab-bag of file-related functions. that's the whole vibe. it does file stuff. iconic. π
π§ Functions π§
okay here's the lineup, no skips, all of them, fr fr:
set_file_rights(%parameters)β sets the owner and/or the access rights on a file.
returns a true value if the rights-setting actually succeeded. otherwise it returns a false value. π
β οΈ note bestie: if superuser was specified as owner, this function will die. like, straight up. don't do it.
copy_dir($dir1, $dir2)β copies a directory and its content. the whole thing. everything in it. β¨del_dir($dir)β deletes a directory and its content. π be normal about it.mk_parent_dir($file)β this one you use before you create a file inside a directory that might not exist yet. it's the "make it make sense first" helper. π«Άmkdir_all($path, $mode)β recursively creates a directory and all its parent directories. goblin mode directory creation. πshift_file($file, $count)β shifts a file by renaming it with a date. if$countis defined, it keeps$countfile and unlinks the others. so like, rotation energy. πget_mtime ( $file )β gets the modification time of the file.
parameter:
$fileβ full path of file.
returns:
- the modification time as UNIX time.
- if the file is not found β and yes, that includes the case where the file vanishes mid-execution of this function, rude β or if it's not readable, it returns
"POSIX::INT_MIN". - in case of any other error, it returns
"undef".
list_dir($dir, $all, $original_encoding)β DEPRECATED. π«
recursively lists the content of a directory. returns an array of hash, with each entry holding directory + filename + encoding.
get_dir_size($dir)βTBD.that's literally all it says bestie. it's a mystery. πqencode_hierarchy()β DEPRECATED. π«
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 variable number of arguments: it can be a list of directory, or a few directory paths. you choose. π
π HISTORY π
Sympa::Tools::File appeared on Sympa 6.2a.41. a legend was born, no cap. β
and that's the whole page, bestie β this was Sympa::Tools::File(3Sympa) from sympa 6.2.80, dated 2026-10-19. go forth and file responsibly ππ¦β¨
π¦ where this page comes from
- fedora 43: sympa-devel-doc 6.2.80-2.fc43 Β· GPL-2.0-or-later AND (OFL-1.1-RFN AND MIT) AND OFL-1.1-RFN AND MIT and (MIT OR GPL-2.0-only)
- fedora 44: sympa-devel-doc 6.2.80-2.fc44 Β· GPL-2.0-or-later AND (OFL-1.1-RFN AND MIT) AND OFL-1.1-RFN AND MIT and (MIT OR GPL-2.0-only)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms