creating files in path and load it problem;

i am trying to create saved files in A specific path and load them using Directory class the problem is when i create the save file it goes to the project folder instead of the created folder how do i fix it`

int score = 10;
    string playername = "player1";
    public InputField savename;
    const string foldername = "Save";
    const string fileextnison = ".txt";
    string filesavename;
    string folderPath = Path.Combine(Application.persistentDataPath, foldername);

    public void savedfiles()
        filesavename = savename.text;
        BinaryFormatter bf = new BinaryFormatter();
        FileStream file = File.Create(folderPath + filesavename + fileextnison);
        PData playerdata = new PData();
        playerdata.scorer = this.score;
        playerdata.names = this.playername;
        bf.Serialize(file, playerdata);


sorry missed one part

FileStream file = File.Create(Application.persistentDataPath + "/" + foldername + "/" + filesavename + fileextnison);
  1. First, you need to create a

If(!Directory.Exists([folder path])) 
    Directory.Create([folder path]);

  1. then create a filename: filesavename + fileextnison;

  2. then use Path.Combine() to fomr the
    full path of your file:

Path.Combine([folder path], [filepath]);