CPEBF storage use with other data types

I would like to store data on the Circuit Playground Express Bluefruit internal storage that is of other data types than char and uint8_t. Has anyone used CPEBF storage for such a purpose? Is this possible? In particular I'd like to store large 1D arrays of ints and unsigned longs.

The CPEBF core comes with Adafruit_LittleFS and InternalFileSystem libraries, they refer to the littlefs and flash_nrf5x libraries. It appears they only handle char and uint8_t data types, and I get the following errors when trying to store other types:

C:\Users\Eric\OneDrive\Documents\Arduino\sketches\FSR_log\FSR_log.ino: In function 'void loop()':
FSR_log:50:28: error: no matching function for call to 'Adafruit_LittleFS_Namespace::File::write(int [10], const int&)'
   50 |     file.write(data, points);
      |                            ^
In file included from C:\Users\Eric\AppData\Local\Arduino15\packages\adafruit\hardware\nrf52\0.21.0\libraries\Adafruit_LittleFS\src/Adafruit_LittleFS.h:33,
                 from C:\Users\Eric\OneDrive\Documents\Arduino\sketches\FSR_log\FSR_log.ino:8:
C:\Users\Eric\AppData\Local\Arduino15\packages\adafruit\hardware\nrf52\0.21.0\libraries\Adafruit_LittleFS\src/Adafruit_LittleFS_File.h:52:20: note: candidate: 'virtual size_t Adafruit_LittleFS_Namespace::File::write(uint8_t)'
   52 |     virtual size_t write (uint8_t ch);
      |                    ^~~~~
C:\Users\Eric\AppData\Local\Arduino15\packages\adafruit\hardware\nrf52\0.21.0\libraries\Adafruit_LittleFS\src/Adafruit_LittleFS_File.h:52:20: note:   candidate expects 1 argument, 2 provided
C:\Users\Eric\AppData\Local\Arduino15\packages\adafruit\hardware\nrf52\0.21.0\libraries\Adafruit_LittleFS\src/Adafruit_LittleFS_File.h:53:20: note: candidate: 'virtual size_t Adafruit_LittleFS_Namespace::File::write(const uint8_t*, size_t)'
   53 |     virtual size_t write (uint8_t const *buf, size_t size);
      |                    ^~~~~
C:\Users\Eric\AppData\Local\Arduino15\packages\adafruit\hardware\nrf52\0.21.0\libraries\Adafruit_LittleFS\src/Adafruit_LittleFS_File.h:53:42: note:   no known conversion for argument 1 from 'int [10]' to 'const uint8_t*' {aka 'const unsigned char*'}
   53 |     virtual size_t write (uint8_t const *buf, size_t size);
      |                           ~~~~~~~~~~~~~~~^~~
C:\Users\Eric\AppData\Local\Arduino15\packages\adafruit\hardware\nrf52\0.21.0\libraries\Adafruit_LittleFS\src/Adafruit_LittleFS_File.h:54:12: note: candidate: 'size_t Adafruit_LittleFS_Namespace::File::write(const char*)'
   54 |     size_t write(const char *str) {
      |            ^~~~~
C:\Users\Eric\AppData\Local\Arduino15\packages\adafruit\hardware\nrf52\0.21.0\libraries\Adafruit_LittleFS\src/Adafruit_LittleFS_File.h:54:12: note:   candidate expects 1 argument, 2 provided
C:\Users\Eric\AppData\Local\Arduino15\packages\adafruit\hardware\nrf52\0.21.0\libraries\Adafruit_LittleFS\src/Adafruit_LittleFS_File.h:58:12: note: candidate: 'size_t Adafruit_LittleFS_Namespace::File::write(const char*, size_t)'
   58 |     size_t write(const char *buffer, size_t size) {
      |            ^~~~~
C:\Users\Eric\AppData\Local\Arduino15\packages\adafruit\hardware\nrf52\0.21.0\libraries\Adafruit_LittleFS\src/Adafruit_LittleFS_File.h:58:30: note:   no known conversion for argument 1 from 'int [10]' to 'const char*'
   58 |     size_t write(const char *buffer, size_t size) {
      |                  ~~~~~~~~~~~~^~~~~~
FSR_log:60:34: error: no matching function for call to 'Adafruit_LittleFS_Namespace::File::write(long unsigned int [10], const int&)'
   60 |     file.write(timeMicros, points);
      |                                  ^
In file included from C:\Users\Eric\AppData\Local\Arduino15\packages\adafruit\hardware\nrf52\0.21.0\libraries\Adafruit_LittleFS\src/Adafruit_LittleFS.h:33,
                 from C:\Users\Eric\OneDrive\Documents\Arduino\sketches\FSR_log\FSR_log.ino:8:
C:\Users\Eric\AppData\Local\Arduino15\packages\adafruit\hardware\nrf52\0.21.0\libraries\Adafruit_LittleFS\src/Adafruit_LittleFS_File.h:52:20: note: candidate: 'virtual size_t Adafruit_LittleFS_Namespace::File::write(uint8_t)'
   52 |     virtual size_t write (uint8_t ch);
      |                    ^~~~~
C:\Users\Eric\AppData\Local\Arduino15\packages\adafruit\hardware\nrf52\0.21.0\libraries\Adafruit_LittleFS\src/Adafruit_LittleFS_File.h:52:20: note:   candidate expects 1 argument, 2 provided
C:\Users\Eric\AppData\Local\Arduino15\packages\adafruit\hardware\nrf52\0.21.0\libraries\Adafruit_LittleFS\src/Adafruit_LittleFS_File.h:53:20: note: candidate: 'virtual size_t Adafruit_LittleFS_Namespace::File::write(const uint8_t*, size_t)'
   53 |     virtual size_t write (uint8_t const *buf, size_t size);
      |                    ^~~~~
C:\Users\Eric\AppData\Local\Arduino15\packages\adafruit\hardware\nrf52\0.21.0\libraries\Adafruit_LittleFS\src/Adafruit_LittleFS_File.h:53:42: note:   no known conversion for argument 1 from 'long unsigned int [10]' to 'const uint8_t*' {aka 'const unsigned char*'}
   53 |     virtual size_t write (uint8_t const *buf, size_t size);
      |                           ~~~~~~~~~~~~~~~^~~
C:\Users\Eric\AppData\Local\Arduino15\packages\adafruit\hardware\nrf52\0.21.0\libraries\Adafruit_LittleFS\src/Adafruit_LittleFS_File.h:54:12: note: candidate: 'size_t Adafruit_LittleFS_Namespace::File::write(const char*)'
   54 |     size_t write(const char *str) {
      |            ^~~~~
C:\Users\Eric\AppData\Local\Arduino15\packages\adafruit\hardware\nrf52\0.21.0\libraries\Adafruit_LittleFS\src/Adafruit_LittleFS_File.h:54:12: note:   candidate expects 1 argument, 2 provided
C:\Users\Eric\AppData\Local\Arduino15\packages\adafruit\hardware\nrf52\0.21.0\libraries\Adafruit_LittleFS\src/Adafruit_LittleFS_File.h:58:12: note: candidate: 'size_t Adafruit_LittleFS_Namespace::File::write(const char*, size_t)'
   58 |     size_t write(const char *buffer, size_t size) {
      |            ^~~~~
C:\Users\Eric\AppData\Local\Arduino15\packages\adafruit\hardware\nrf52\0.21.0\libraries\Adafruit_LittleFS\src/Adafruit_LittleFS_File.h:58:30: note:   no known conversion for argument 1 from 'long unsigned int [10]' to 'const char*'
   58 |     size_t write(const char *buffer, size_t size) {
      |                  ~~~~~~~~~~~~^~~~~~
exit status 1
no matching function for call to 'Adafruit_LittleFS_Namespace::File::write(int [10], const int&)'

this is the sketch I am working on:

/* FSR testing sketch.

  Connect one end of FSR to power, the other end to Analog 0.
  Then connect one end of a 10K resistor from Analog 0 to ground

  For more information see www.ladyada.net/learn/sensors/fsr.html */

#include 
#include 
#define FILENAME_DATA    "/data.txt"
#define FILENAME_TIME    "/time.txt"

using namespace Adafruit_LittleFS_Namespace;

int fsrPin = A1;     // the FSR and 10K pulldown are connected to a0
int fsrReading;     // the analog reading from the FSR resistor divider
int fsrVoltage;     // the analog reading converted to voltage
unsigned long fsrResistance;  // The voltage converted to resistance, can be very big so make "long"
unsigned long fsrConductance;
long fsrForce;       // Finally, the resistance converted to force
const int points = 10;
int data[points];
unsigned long timeMicros[points];

File file(InternalFS);

void setup(void)
{
  pinMode(A1, INPUT);
  Serial.begin(9600);
  // Initialize Internal File System:
  InternalFS.begin();
}

void loop(void)
{
  Serial.print("Enter to any keys to continue:");
  while ( !Serial.available() )
  {
    delay(1);
  }

  READ_FSR();

  Serial.println("measurement done, writing data");

  if ( file.open(FILENAME_DATA, FILE_O_WRITE) )
  {
    Serial.println("OK");
    file.write(data, points);
    file.close();
  } else
  {
    Serial.println("data file failed!");
  }

  if ( file.open(FILENAME_TIME, FILE_O_WRITE) )
  {
    Serial.println("OK");
    file.write(timeMicros, points);
    file.close();
  } else
  {
    Serial.println("time file failed!");
  }
}

void READ_FSR()
{
  static unsigned long startTimeMicros;

  startTimeMicros = micros();
  for (int i = 0; i < points; i++)
  {
    fsrReading = analogRead(fsrPin);
    Serial.print("Analog reading = ");
    Serial.print(0);
    Serial.print("\t");
    Serial.print(fsrReading);
    Serial.print("\t");
    Serial.println(1023);

    data[i] = fsrReading;
    timeMicros[i] = micros() - StartTimeMicros;
  }
}

It appears from the library [https://github.com/littlefs-project/littlefs]littlefs-project/littlefs](https://github.com/littlefs-project/littlefs) that there are only the 2 functions for char and uint8_t. Can anyone provide any solution for my purposes?

If you can write a byte, you can write anything. The Adafruit FRAM library is the same way. I needed to store an array of four byte integers. Here are the functions that do it:

const byte NoTools=8;

uint32_t BaseToolPositions[NoTools];             // Where is each tool in position. Initialized in setup. 

/*
 FRAM routines. All you can do with the Adafruit library is read or write one byte at a time from any address

 Write the tool positions array to FRAM. 
 Use a byte pointer to write the bytes that make up the array, one at a time.
 */

void WriteToolPositionsToFram()
{
uint8_t *ptr=(uint8_t*)BaseToolPositions;
for(uint16_t lp=0;lp