Skip to content
This repository has been archived by the owner on Sep 30, 2021. It is now read-only.

FileIO File class lacks default assignment operator #12

Open
agdl opened this issue Jul 12, 2016 · 3 comments
Open

FileIO File class lacks default assignment operator #12

agdl opened this issue Jul 12, 2016 · 3 comments
Assignees

Comments

@agdl
Copy link
Member

agdl commented Jul 12, 2016

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
Copy link
Member Author

agdl commented Jul 12, 2016

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
Copy link
Member Author

agdl commented Jul 12, 2016

From @dellissen on February 9, 2016 23:22

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

thanks all

@faultyd3v
Copy link

Hi,

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

Thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants