package edu.chl.proton.model;

import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
import java.util.List;

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


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

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



    protected void save(List<String> text) throws IOException {

        File file = new File(this.getPath());
        BufferedWriter out = new BufferedWriter(new FileWriter(String.valueOf(file)));

        for(String line : text) {
            out.write(line);
        }
        out.close();

    }

    protected boolean isSaved() {
        return true;
    }

    protected void remove() {

    }
}

@@ -249,16 +249,46 @@
 tity %7B%0A%0A
+    private boolean isSaved;%0A%0A
 %0A    pub
@@ -469,16 +469,158 @@
 %0A    %7D%0A%0A
+    protected void setIsSaved(boolean state) %7B%0A        isSaved = state;%0A    %7D%0A%0A    protected boolean isSaved() %7B%0A        return isSaved;%0A    %7D
 %0A%0A    pr
@@ -910,70 +910,40 @@
 ();%0A
-%0A
     
-%7D%0A%0A
     
-protected boolean isSaved() %7B%0A        return true;
+setIsSaved(true);%0A    %7D%0A
 %0A   

Add isSaved and setIsSaved