private DummyAction getActionFromSnapshotFile(SnapshotFile file) throws IOException {
	
		State state = file.getState();
		DummyAction action = null;
		
		if (state instanceof New) {
			action = new DummyAdd(file.getFilename(), file.getSize());
			this.totalBytes += file.getSize();
		} else if (state instanceof Modified) {
			ArrayList<ByteRange> modifications = generateUpdate(file.getSize());
			int bytesAdded = this.getBytesAdded(modifications);
			file.setSize(file.getSize() + bytesAdded);
			this.totalBytes += bytesAdded;
			action = new DummyUpdate(file.getFilename(), modifications);
		} else if (state instanceof Unmodified) {
			action = null;
		} else if (state instanceof Deleted) {
			Deleted deleted = (Deleted) state;
			if (!deleted.isWritten()) {
				action = new DummyRemove(file.getFilename());
				deleted.setWritten(true);
				this.totalBytes -= file.getSize();
			}
		}
		
		return action;
	}