SPIFFS file not opening in NodeMCU

Ya, thats the problem

What could possibly be wrong,

any effort is apperciated

this is the piece of code I am running in the above program

class Data {

private:
    int moisture_reading, pressure, humidity, ambient_temperature, lux_value, month, day, year, hour, minute, second;
    String filename;
    int Return_values[11];
    int readingNo = 0;
    struct ReadValues {

        int Return_values[11];

    };
    ReadValues ReadValues1[];

public:
    Data(int Moisture, int Pressure, int Humidity, int Month, int Day, int Year, int Hour, int Minute, int Second, int lux) {

        moisture_reading = Moisture;
        pressure = Pressure;
        humidity = Humidity;
        month = Month;
        day = Day;
        year = Year;
        hour = Hour;
        minute = Minute;
        second = Second;
        lux_value = lux;
    }

    void WriteData() {
        filename = "datalog.txt";

        File myDataFile = SPIFFS.open(filename, "W");
        if (!myDataFile)Serial.println("file open failed");

        myDataFile.println(moisture_reading);
        myDataFile.println(pressure);
        myDataFile.println(humidity);
        myDataFile.println(ambient_temperature);
        myDataFile.println(lux_value);
        myDataFile.println(month);
        myDataFile.println(day);
        myDataFile.println(year);
        myDataFile.println(hour);
        myDataFile.println(minute);
        myDataFile.println(second);

        myDataFile.close();


        Serial.println("Writing of data done\n");

    }

    ReadValues* ReadData() {

        File myDataFile = SPIFFS.open(filename, "r");
        if (!myDataFile) Serial.println("file open failed");

        delay(500);

        char buffer[64];
        readingNo = 0;
        while (myDataFile.available()) {

            Serial.println("file opened");
            int l = myDataFile.readBytesUntil('\n', buffer, sizeof(buffer));
            buffer[l] = 0;
            lux_value = atoi(buffer);

            Serial.println("lux_value");
            Serial.println(lux_value);


            l = myDataFile.readBytesUntil('\n', buffer, sizeof(buffer));
            buffer[l] = 0;
            moisture_reading = atoi(buffer);

            Serial.println("moisture_reading");
            Serial.println(moisture_reading);

            l = myDataFile.readBytesUntil('\n', buffer, sizeof(buffer));
            buffer[l] = 0;
            ambient_temperature = atoi(buffer);

            Serial.println("ambient_temperature");
            Serial.println(ambient_temperature);

            l = myDataFile.readBytesUntil('\n', buffer, sizeof(buffer));
            buffer[l] = 0;
            pressure = atoi(buffer);

            Serial.println("pressure");
            Serial.println(pressure);


            l = myDataFile.readBytesUntil('\n', buffer, sizeof(buffer));
            buffer[l] = 0;
            humidity = atoi(buffer);

            Serial.println("humidity");
            Serial.println(humidity);

            l = myDataFile.readBytesUntil('\n', buffer, sizeof(buffer));
            buffer[l] = 0;
            month = atoi(buffer);

            Serial.println("month");
            Serial.println(month);

            l = myDataFile.readBytesUntil('\n', buffer, sizeof(buffer));
            buffer[l] = 0;
            day = atoi(buffer);

            Serial.println("day");
            Serial.println(day);

            l = myDataFile.readBytesUntil('\n', buffer, sizeof(buffer));
            buffer[l] = 0;
            year = atoi(buffer);

            Serial.println("year");
            Serial.println(year);

            l = myDataFile.readBytesUntil('\n', buffer, sizeof(buffer));
            buffer[l] = 0;
            hour = atoi(buffer);

            Serial.println("hour");
            Serial.println(hour);

            l = myDataFile.readBytesUntil('\n', buffer, sizeof(buffer));
            buffer[l] = 0;
            minute = atoi(buffer);

            Serial.println("minute");
            Serial.println(minute);

            l = myDataFile.readBytesUntil('\n', buffer, sizeof(buffer));
            buffer[l] = 0;
            second = atoi(buffer);

            Serial.println("second");
            Serial.println(second);

            //            Struct ReadValues ReadValues1[];

            ReadValues1[readingNo].Return_values[0] = moisture_reading;
            ReadValues1[readingNo].Return_values[1] = pressure;
            ReadValues1[readingNo].Return_values[2] = humidity;
            ReadValues1[readingNo].Return_values[3] = ambient_temperature;
            ReadValues1[readingNo].Return_values[4] = lux_value;
            ReadValues1[readingNo].Return_values[5] = month;
            ReadValues1[readingNo].Return_values[6] = day;
            ReadValues1[readingNo].Return_values[7] = year;
            ReadValues1[readingNo].Return_values[8] = hour;
            ReadValues1[readingNo].Return_values[9] = minute;
            ReadValues1[readingNo].Return_values[10] = second;

            readingNo++;
        }
        myDataFile.close();                                   // Close the file

        Serial.println("File reading done\n");

        return ReadValues1;
    }

    void DeleteData() {

        SPIFFS.remove(filename);//delete the file now
        Serial.println("file deleted");

    }


};

I am not able to upload whole code here, for its too big, tell me if you want it, I'll mail or upload on my github.

heres a picture of tools from my IDE

heres the link to whole code

https://github.com/SadafShafi/Sadaf-Shafi/blob/master/Device.ino