Skip navigation links

Package com.physpics.tools

This package provides a number of utilities, especially for dealing with files.

See: Description

Package com.physpics.tools Description

This package provides a number of utilities, especially for dealing with files. Assets Packages may need data files that can be written by the user. These are called "assets". In the source code they appear in distsrc/assets. In those places where they are installed, they are in assets/package-name/assetname.extension This tree is installed into: In addition, a modified version of the data can be retained in userhome:.physpics/. When finding an asset, the code looks first in userhome and then in the other three locations in the order listed. An Assets.java file is generated among the sources for any package that has files in distsrc/assets/. To fetch an asset, Assets.java has three methods, where assetname is the name the file has in distsrc/assets: To read assets from another package, a program references the Assets.java class for that package. For instance, to get the asses colors.txt from package com.physpics.tools, the code is com.physpics.tools.Assets.fetch(colors.txt)
Skip navigation links