Creates a temporary file path. The directory is created if it does not exist. If fileName is provided, the file will be created in a unique temporary directory. Otherwise, the file will be created directly in the app's root temporary directory.
Sets the app temporary root directory to a custom path. This is useful for testing purposes. The default app temporary root directory is <tmp_dir>/_app.