[][src]Module phetch::phetchdir

The phetchdir is DIR, or ~/.config/phetch by default. There is currently no way to change it. Bookmarks, user history, and the phetch.conf all live in this directory in a fully loaded installation of phetch.

This module provides helpers for working with the phetchdir: checking its existence, saving to files inside it, and the sort.

Constants

DIR

The directory where phetch stores its files. Ex: bookmarks file If you want the full, expanded path, use path().

Functions

append

Append a menu item as a line to a file in the phetchdir.

exists

Check if a file exists within the phetchdir.

load

Loads a file from the phetchdir for reading.

path

Returns the full, expanded PathBuf of the phetchdir only if it exists. Returns None otherwise. If you just want the phetchdir path whether or not it exists, use the DIR constant directly.

prepend

Add a menu item as the first line in a file in the phetchdir.