๐ฆโ๐ฆ Store and retrieve files on the Atmosphere
Something went wrong. Try again.
Shell
12345678910111213141516171819202122#!/usr/bin/env bash
function atfile.cache.del() { key="$(atfile.util.get_cache_path "$1")" [[ -f "$key" ]] && rm "$key"}
function atfile.cache.get() { key="$(atfile.util.get_cache_path "$1")" [[ -f "$key" ]] && cat "$key"}
function atfile.cache.set() { key="$(atfile.util.get_cache_path "$1")" value="$2"
# shellcheck disable=SC2154 mkdir -p "$_path_cache" echo "$value" > "$key" echo "$value"}