Skip to main contentModule file_utils
Source - EmailSubdirInfo
- Information about the subdirectory for a message when using folder-based layouts.
- apply_permissions
- Apply configured permissions to a path (Unix only).
- checkdir
- Creates a directory and all parent directories if they don’t exist.
- dirpath
- Expands date format placeholders (
%y, %m, %d, etc.) in a path template. - find_max_msgnum
- Scans the output directory and returns the highest sequential message number found.
- is_empty_archive
- Returns true if the archive directory contains no non-hidden files.
- load_old_headers_from_html
- Loads email metadata from existing HTML archive files for incremental updates.
- lock_file_name
- Returns the path to the lock file for this archive.
- matches_existing
- Returns true if two Message-IDs match (trimmed comparison).
- message_filename
- Returns the full filename for a message (name + HTML suffix).
- message_name
- Generates a unique name for an email message.
- message_path
- Returns the full filesystem path for a message’s HTML file.
- message_url_str
- Returns the relative URL string for a message, including subdirectory if applicable.
- messageindex_name
- Returns the path to the message index file.
- msg_subdir
- Determines the subdirectory for a message based on folder configuration.
- read_messageindex
- Reads the message index file, returning a table of message number to filename mappings.
- symlink_latest
- Creates a symlink pointing to the latest folder (if configured).
- try_lock
- Acquires an exclusive non-blocking lock on the archive directory.
- write_messageindex
- Writes the message index file mapping message numbers to filenames.