i donno,if spiffs bestowed me with 4 MB space??

hi every one
i was just using spiffs to save my things into flash,believing that it promised me with 4MB of space.....i made the program,which works well.....but could some one please suggest how would i see if really it does have access to 4 mb.....
thanks already

void data_saver(){
  //saves data in flash if wifi is not connected
  digitalWrite(common_power,HIGH);
  delay(20);
  
  moisture_reading_function();
  temperature_reading_function();
  lux_reading_function();
//  BME();
//  lux_value, Celcius,moisture_reading,ambient_temperature,pressure,humidity
int a=0;
 while(a<3){
  File myDataFile = SPIFFS.open(filename, "a+");
  if (!myDataFile)Serial.println("file open failed"); 
  myDataFile.println("reading :"+String(reading_no));
  reading_no++;
  myDataFile.println(String(lux_value)+"\n"+String(Celcius)+"\n"+String(moisture_reading)+"\n"+String(ambient_temperature)+"\n"+String(pressure)+"\n"+String(humidity)+"\n");                    // Display the file size (26 characters + 4-byte floating point number + 6 termination bytes (2/line) = 34 bytes)
  myDataFile.close();
  Serial.println("---->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>here i am");
  a++;
 }
  data_reader();
//  ESP.deepSleep(10);
}
uint8_t beef[50];
int len;
void data_reader(){
     myDataFile = SPIFFS.open(filename, "r");              // Open the file again, this time for reading
    if (!myDataFile) Serial.println("file open failed");  // Check for errors
//    Serial.println(myDataFile.read());
//    Serial.println("....................."); 
    delay(5000);   
            char buffer[64];
              while (myDataFile.available()){
                  int l = myDataFile.readBytesUntil('\n', buffer, sizeof(buffer));
                  buffer[l] = 0;
                  String(reading)=String(buffer);
                  Serial.println("reading");
                  Serial.println(reading);
                  l = myDataFile.readBytesUntil('\n', buffer, sizeof(buffer));
                  buffer[l] = 0;
                  String(lux_value)=String(buffer);
                  Serial.println("lux_value");
                  Serial.println(lux_value);
                  l = myDataFile.readBytesUntil('\n', buffer, sizeof(buffer));
                  buffer[l] = 0;
                  String(Celcius)=String(buffer);
                  Serial.println("Celcius");
                  Serial.println(Celcius);
                  l = myDataFile.readBytesUntil('\n', buffer, sizeof(buffer));
                  buffer[l] = 0;
                  String(moisture_reading)=String(buffer);
                  Serial.println("moisture_reading");
                  Serial.println(moisture_reading);
                  l = myDataFile.readBytesUntil('\n', buffer, sizeof(buffer));
                  buffer[l] = 0;
                  String(ambient_temperature)=String(buffer);
                  Serial.println("ambient_temperature");
                  Serial.println(ambient_temperature);
                  l = myDataFile.readBytesUntil('\n', buffer, sizeof(buffer));
                  buffer[l] = 0;
                  String(pressure)=String(buffer);
                  Serial.println("pressure");
                  Serial.println(pressure);
                  l = myDataFile.readBytesUntil('\n', buffer, sizeof(buffer));
                  buffer[l] = 0;
                  String(humidity)=String(buffer);
                  Serial.println("humidity");
                  Serial.println(humidity);
                  myDataFile.readBytesUntil('\n', buffer, sizeof(buffer));
                  sendData(String(lux),String( Temperature),String( moisture),String(ambient_temperature),String(pressure),String(humidity));
                  Serial.println("123654789841258542568525856852568585here i am");
              }
    myDataFile.close();                                   // Close the file
    delay(10000); 
 
  SPIFFS.remove(filename);//delete the file now
}

if you want me to u[pload whole code...do tell me ...but its quite long

sabishaw:
how would i see if really it does have access to 4 mb.....

Unlikely since the module probably only has 4 MB of flash space. If all of that went to SPIFFS there would be no room for your program. YOU get to select the allocation in the IDE:

thanks gfvalvo...could you please tell me is 1M,2M,3M spiffs memory.......i tried to google,superficially,it suggested something about time to upload....
'again, how do i test in my program,to see if it is really 3mb (atleast).....thanks

FSInfo fs_info;
SPIFFS.info(fs_info);

and the you can print members of the fs_info struct

struct FSInfo {
size_t totalBytes;
size_t usedBytes;
size_t blockSize;
size_t pageSize;
size_t maxOpenFiles;
size_t maxPathLength;
};