These Python functions allow you to access asset files, which may be found in the game directory, RPA archives, or as Android assets.
Returns a read-only file-like object that accesses the file named fn. The file is accessed using Ren'Py's standard search method, and may reside in an RPA archive. or as an Android asset.
The object supports a wide subset of the fields and methods found on python's standard file object, opened in binary mode. (Basically, all of the methods that are sensible for a read-only file.)
Lists the files in the game directory and archive files. Returns a list of files, with / as the directory separator.
Returns True if the given filename is loadable, meaning that it can be loaded from the disk or from inside an archive. Returns False if this is not the case.
These functions are used more rarely.
Returns true if the given filename can be found in the searchpath. This only works if a physical file exists on disk. It won't find the file if it's inside of an archive.
You almost certainly want to use
renpy.loadable() in preference
to this function.
Converts s from filesystem encoding to unicode.
Converts s from unicode to the filesystem encoding.
Given an image manipulator, loads it and returns a (
height) tuple giving its size.
This reads the image in from disk and decompresses it, without using the image cache. This can be slow.