From e5eeaa7df894b5062c189f5d8da44c67550cf43a Mon Sep 17 00:00:00 2001 From: Damien George Date: Fri, 27 Sep 2024 13:10:32 +1000 Subject: [PATCH] docs/reference/mpremote: Update docs to mention new features. Signed-off-by: Damien George --- docs/reference/mpremote.rst | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/reference/mpremote.rst b/docs/reference/mpremote.rst index 3ed8a3dbc..4d86f0080 100644 --- a/docs/reference/mpremote.rst +++ b/docs/reference/mpremote.rst @@ -227,11 +227,12 @@ The full list of supported commands are: - ``cat `` to show the contents of a file or files on the device - ``ls`` to list the current directory - ``ls `` to list the given directories - - ``cp [-r] `` to copy files + - ``cp [-rf] `` to copy files - ``rm `` to remove files on the device - ``mkdir `` to create directories on the device - ``rmdir `` to remove directories on the device - ``touch `` to create the files (if they don't already exist) + - ``sha256sum `` to calculate the SHA256 sum of files The ``cp`` command uses a convention where a leading ``:`` represents a remote path. Without a leading ``:`` means a local path. This is based on the @@ -256,6 +257,11 @@ The full list of supported commands are: This will copy the file to the device then enter the REPL. The ``+`` prevents ``"repl"`` being interpreted as a path. + The ``cp`` command supports the ``-r`` option to make a recursive copy. By + default ``cp`` will skip copying files to the remote device if the SHA256 hash + of the source and destination file matches. To force a copy regardless of the + hash use the ``-f`` option. + **Note:** For convenience, all of the filesystem sub-commands are also :ref:`aliased as regular commands `, i.e. you can write ``mpremote cp ...`` instead of ``mpremote fs cp ...``.