package edu.chl.proton.model;

/**
 * @author Stina Werme
 * Created by stinawerme on 01/05/17.
 */
public class File extends FileSystemEntity {

    //private Document document;

    public File(String name) {
        this.setName(name);
    }

    public File(String name, Folder parentFolder) {
        this.setName(name);
        parentFolder.addFile(this);
    }

    //protected Document getDocument() {
    //    return this.document;
    //}

    //protected void setDocument(Document document) {
    //    this.document = document;
    //}

    // What should be saved? Shouldn't this be in document?
    protected void save() {

    }

    protected boolean isSaved() {
        return true;
    }
}

@@ -24,16 +24,126 @@
 model;%0A%0A
+import java.io.BufferedWriter;%0Aimport java.io.FileWriter;%0Aimport java.io.IOException;%0Aimport java.util.List;%0A%0A
 /**%0A * @
@@ -661,91 +661,296 @@
     
-// What should be saved? Shouldn't this be in document?%0A    protected void save() %7B
+protected void save(List%3CString%3E text) throws IOException %7B%0A%0A        File file = new File(this.getPath());%0A        BufferedWriter out = new BufferedWriter(new FileWriter(String.valueOf(file)));%0A%0A        for(String line : text) %7B%0A            out.write(line);%0A        %7D%0A        out.close();
 %0A%0A  

Fix save method