(g *Graph)
| 141 | } |
| 142 | |
| 143 | func (p *processor) openInteractiveGraphDataFile(g *Graph) (*os.File, error) { |
| 144 | // We store interactive graph data files, temporarily while the user is |
| 145 | // interacting with the graph, somewhat deep in the system temp folder. |
| 146 | // It's in a system temp folder because import jobs are not typically |
| 147 | // portable; especially starting on one system and continuing on another, |
| 148 | // though I guess we could simply change the path to be something within |
| 149 | // the timeline if desired. Still, this seems more proper at least for now. |
| 150 | tmpFilePath := filepath.Join(p.tempGraphFolder(), g.ProcessingID+".graph.data") |
| 151 | |
| 152 | // ensure folder tree exists or we're gonna have a bad time |
| 153 | if err := os.MkdirAll(filepath.Dir(tmpFilePath), 0700); err != nil { |
| 154 | return nil, err |
| 155 | } |
| 156 | |
| 157 | return os.Create(tmpFilePath) |
| 158 | } |
| 159 | |
| 160 | func (p *processor) tempGraphFolder() string { |
| 161 | return filepath.Join( |
no test coverage detected