arduino-libraries / Bridge

Bridge Library for Arduino
http://arduino.cc/
13 stars 28 forks source link

FileIO File class lacks default assignment operator #12

Open agdl opened 8 years ago

agdl commented 8 years ago

From @davecheney on January 17, 2014 23:56

#include "FileIO.h"

void setup() {
  Bridge.begin();
  FileSystem.begin();

  File f;
  f = FileSystem.open("/tmp/whatever");
}

void loop() {

}

Results in

/Applications/Arduino.app/Contents/Resources/Java/libraries/Bridge/src/FileIO.h: In member function 'File& File::operator=(const File&)':
/Applications/Arduino.app/Contents/Resources/Java/libraries/Bridge/src/FileIO.h:28: error: non-static reference member 'BridgeClass& File::bridge', can't use default assignment operator
sketch_jan18b.ino: In function 'void setup()':
sketch_jan18b.ino:8: note: synthesized method 'File& File::operator=(const File&)' first required here 

This example is taken from a larger example, basically trying to open a File inside a class constructor.

Copied from original issue: arduino/Arduino#1810

agdl commented 8 years ago

From @SuperTango on November 11, 2015 22:16

This is a bit of a pain as it makes working with files in the Yun inefficient.

agdl commented 8 years ago

From @dellissen on February 9, 2016 23:22

Hi guys, is there anybody know if this problem has a solution ?

thanks all

faultyd3v commented 8 years ago

Hi,

Did anything ever come of this? Quite annoying to keep open and close the file every time.

Thanks.