When every application is created, each application has an ASD, or application specific directory. This ASD is a folder/directory for your app to store data, and only your app can access it. For devices with Android 10 or above, this ASD is automatically created, but with phones before that, you have to create an ASD.
This is an extension to do that.
My previous post creates a folder in the ASD. I don't know what do you mean by
Since targetSdkVersion = 30 (AI2 nb 188) it is no longer possible to create folders in the root directory or in an arbitrary folder of the external storage on Android 11+ devices. This is only possible there if MANAGE_EXTERNAL_STORAGE permission has been requested and granted. However, this special permission is usually not allowed by Google.
I don't know why you want to save it in /storage/emulated/0. The best way is to save it in the ASD (application specific directory) with the normal File component and the Scope set to App.
By the way, this block creates a folder in the Private directory (internal storage) which you can access on your device only when it is rooted. (You must put a / at the beginning of the folder name or you must use FileScope = Shared)