After reading a file from "application/private/data" multiple times an error gets thrown displaying "No available fd slots". The file's contents is read sequentially with the use of an array buffer.
This works a few times (around 5 or so) until it throws the error upon trying to call fs.opensync()
If anyone knows what causes this error or how to avoid it that would be great!
An abbreviated version of the code:
var fileDesc = fileSystem.openSync( PENDING_FILE_NAME , 'r' ); var LengthToRead = 70; var buffer = new ArrayBuffer(LengthToRead); fileSystem.readSync( fileDesc , buffer , 0 , LengthToRead , 0 ); ... fileSystem.closeSync(fileDesc)
Could you also please confirm whether or not files stored in "/private/data" are permanent or if there is somewhere else they should be saved.
Many thanks
Adam
Best Answer