Skip to content

Cache

Cache any file.

Parameters

ParameterTypeValue
idstringThe cache id. The default will be an integer starting from 0 and increases for each Cache instance.
userUserThe userfolder to dump all cache files.
root_pathstringThe main path to remove from file paths. by default, this is the user's path. "C:/Users/YOUR_NAME/"

Methods

exists

UNDOCUMENTED

key

UNDOCUMENTED

add_file

UNDOCUMENTED

add_directory

UNDOCUMENTED

remove_file

UNDOCUMENTED

get_file

UNDOCUMENTED

Example

py
cache = UserFolder.Cache()
cache.add_file('example1.png')

file = cache.get_file('example1.png')
print(file)

img = Image.open(file)
img.show()

Not associated with or approved by Mojang Studios or Microsoft