Copyright ©

Mongoose OS Forum

ATTENTION! This forum has moved to:

Do not post any new messages.

How to add directory to filesystem?


If I create /home/john/project/fs/www/index.htmland in /home/john/project/mos.yml I have

  - fs

then during building it fails with the following error:

cp: -r not specified; omitting directory '/home/john/project/fs/www'

Is it a mos bug?


  • To add files to the filesystem:

      - fs
      - fs/www

    But SPIFFS is flat and all the files from fs/www and fs will go in the root of the filesystem.

  • Good to know it is flat. Now it explains everything. I was confused by http.document_root config parameter.


  • mamuespmamuesp Germany/Northern coast

    You may add additional filesystems (if remaining space is left) and use it like a "folder" in the "/" filesystem. See HowTos to do so. Or you may use zipped archives and access the files there on demand - it's faster thsn file system access, but consumes a lot of memory. As my devices have PSRAM attached, this is no problem for me.

  • Thanks for the info @mamuesp.

Sign In or Register to comment.