Add more info about .pioenvs directory

This commit is contained in:
Ivan Kravets
2016-07-11 19:34:36 +03:00
parent 03b0b61aa1
commit 2fdc57055b
2 changed files with 15 additions and 2 deletions

View File

@ -97,7 +97,11 @@ This option can be overridden by global environment variable
``envs_dir``
^^^^^^^^^^^^
This is a cache directory. *PlatformIO Build System* uses this folder for project
.. warning::
**PLEASE DO NOT EDIT FILES IN THIS FOLDER**. PlatformIO will overwrite
your changes on the next build. **THIS IS A CACHE DIRECTORY**.
*PlatformIO Build System* uses this folder for project
environments to store compiled object files, static libraries, firmwares and
other cached information. It allows PlatformIO to build source code extremely
fast!

View File

@ -81,6 +81,7 @@ class cd(object):
class memoized(object):
'''
Decorator. Caches a function's return value each time it is called.
If called later with the same arguments, the cached value is returned
@ -212,10 +213,18 @@ def get_projectlib_dir():
def get_pioenvs_dir():
return _get_projconf_option_dir(
path = _get_projconf_option_dir(
"envs_dir",
join(get_project_dir(), ".pioenvs")
)
dontmod_path = join(path, "do-not-modify-files-here.url")
if not isfile(dontmod_path):
with open(dontmod_path, "w") as fp:
fp.write("""
[InternetShortcut]
URL=http://docs.platformio.org/en/latest/projectconf.html#envs-dir
""")
return path
def get_projectdata_dir():