public void Save(StreamWriter streamWriter)
        {
            JsonAnalysisExport jsonAnalysisExport = new JsonAnalysisExport(streamWriter);

            jsonAnalysisExport.Open(Snapshot);

            SaveDirectory(jsonAnalysisExport, Snapshot);

            jsonAnalysisExport.Close();
        }
        private void SaveDirectory(JsonAnalysisExport jsonAnalysisExport, HDirectory directory)
        {
            jsonAnalysisExport.AddAndOpen(directory);

            foreach (HDirectory subDirectory in directory.Directories)
            {
                SaveDirectory(jsonAnalysisExport, subDirectory);
            }

            foreach (HFile file in directory.Files)
            {
                jsonAnalysisExport.Add(file);
            }

            jsonAnalysisExport.CloseDirectory();
        }