# Opening assets inside folders

**URL:** https://discourse.processing.org/t/opening-assets-inside-folders/35010
**Category:** Coding Questions
**Created:** [February 6, 2022, 4:21pm UTC](https://discourse.processing.org/t/opening-assets-inside-folders/35010 "2022-02-06T16:21:45Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)
#### Post date: [February 6, 2022, 4:34pm UTC](https://discourse.processing.org/t/opening-assets-inside-folders/35010/2 "2022-02-06T16:34:10Z")

</div>

[**dataPath()**](http://processing.github.io/processing-javadocs/core/processing/core/PApplet.html#dataPath-java.lang.String-)

> [@Save image by input name as jpg or to absolute path](https://discourse.processing.org/t/save-image-by-input-name-as-jpg-or-to-absolute-path/8674/3):
>
> Pass the filename’s String as an argument for dataPath(): open_file_folder partialSave.save(dataPath(line));

> [@Weird issue with pgraphics](https://discourse.processing.org/t/weird-issue-with-pgraphics/2063/4):
>
> /\*\* \* PGraphics arrayCopy() (v1.1) \* GoToLoop (2018/Jul/25) \* Discourse.Processing.org/t/weird-issue-with-pgraphics/2063/4 \*/ static final String FILENAME = "balls.", EXT = ".jpg"; static final String FC = "Frames: ", SC = " - Shots: "; static final int BALLS = 200, DIAM = 20, RAD = DIAM \>\> 1; PGraphics left, right; void setup() { size(640, 480); left = createGraphics(width \>\> 1, height); right = createGraphics(width \>\> 1, height); left.beginDraw(); left.background((color) …

> [@Save variable in a loop](https://discourse.processing.org/t/save-variable-in-a-loop/4654/4):
>
> /\*\* \* Load & Save Variable (v1.0.1) \* GoToLoop (2018/Oct/20) \* https://Discourse.Processing.org/t/save-variable-in-a-loop/4654/4 \*/ int a; void setup() { size(300, 200); noLoop(); fill(-1); textAlign(CENTER, CENTER); textSize(0100); final String[] aFile = loadStrings("a.txt"); if (aFile != null) a = int(aFile[0]); } void draw() { background((color) random(#000000)); text(a, width\>\>1, height\>\>1); } void mousePressed() { ++a; redraw = true; } @Override void exit()…

> [@Iterate throw JSON array values](https://discourse.processing.org/t/iterate-throw-json-array-values/1710/3):
>
> /\*\* \* JSON to CSV (v1.3) \* GoToLoop (2018/Jul/12) \* https://Discourse.Processing.org/t/iterate-throw-json-array-values/1710/3 \*/ JSONObject json = loadJSONObject("data.json"); JSONObject facets = json.getJSONObject("facet\_counts").getJSONObject("facet\_fields"); JSONArray jsonArr = facets.getJSONArray("structHasAuthIdHal\_fs"); Table t = new Table(); int[] colTypes = { Table.STRING, Table.STRING, Table.STRING, Table.INT }; t.setColumnTypes(colTypes); for (int size = jsonArr.size(), i = 0; i…

---

_[View the full topic](https://discourse.processing.org/t/opening-assets-inside-folders/35010)._
