Move file from streaming assets to other directory

Hello there,
how can i move a file (.jpg) located in the streaming assets to another folder on my device (Android)?

This is what i got so far:

    private IEnumerator MoveJPG() {
        // Get path of file in streaming assets
        string filePath = System.IO.Path.Combine(Application.streamingAssetsPath, "MyFile");    

        // Using AssetBundle to get the file is correct?
        AssetBundle result = null;

        WWW www = new WWW(filePath);
        yield return www;
        result = www.assetBundle;

        // How to move the file from a to b now?
        File.Move( result.? , filedir);
    }

Pretty new in using streaming assets.

Any advice would be great :slight_smile:

Thank you

You can extract the byte array from the www and write that to a new file in (for example) persistent datapath.

System.IO.File.WriteAllBytes(Application.persistentDataPath + “/myfile”, www.bytes);