public SnapshotWriter create(final boolean fromEmpty) {
        LocalSnapshotWriter writer = null;
        // noinspection ConstantConditions
        do {
            // delete temp
            // TODO: Notify watcher before deleting
            if (new File(this.tempPath).exists() && fromEmpty) {
                if (!destroySnapshot(this.tempPath)) {
                    break;
                }
            }
            writer = new LocalSnapshotWriter(this.tempPath, this, this.raftOptions);
            if (!writer.init(null)) {
                LOG.error("Fail to init snapshot writer.");
                writer = null;
                break;
            }
        } while (false);
        return writer;
    }
Snapshot storage based on local file storage.

@author boyan (boyan@alibaba-inc.com)
<p>
2018-Mar-13 2:11:30 PM
jraft-core/src/main/java/com/alipay/sofa/jraft/storage/snapshot/local/LocalSnapshotStorage.java