Copyright © https://mongoose-os.com

Mongoose OS Forum

frame
ATTENTION! This forum has moved to:

https://community.mongoose-os.com

Do not post any new messages.

How to add directory to filesystem?

Hello,

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

filesystem:
  - 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?

Comments

  • To add files to the filesystem:

    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.

    Thanks!

  • 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.