I need to hide a particular folder on my Mac from other people who might want to view or copy them while I'm away from home.
There are two ways I'm aware of. The first way is to hide the folder using Terminal.
chflags hidden your-folder
chflags nohidden your-folder
The second way is to move the files from the folder to a disk image, which is created using Disk Utility. And again, it seems there are two different ways, both are described here: Create a disk image using Disk Utility on Mac, sections
Create a disk image from a folder or connected device
Disk Utility > File > New Image > Image From Folder > Encryption = 128-bit AES encryption > Passoword = ... > Image Format = read/write
and Create a secure disk image
Disk Utility > File > New Image > Blank Image > Size = 100 MB (default) (as far as I understand, this value doesn't matter, because we will use read/write futher) > Format = APFS > Encryption = 128-bit AES encryption > Partitions = Single partition - GUID partition map (default) (I don't know what does it mean) > Image Format = read/write disk image
What I don't understand and what my question is about is whether any practical difference here between creating a disk image from folder and creating a blank disk image. And if it is, then what is this difference.
Note that a disk image should not be limited to a particular size. I want to be able to add there as many files as I want. That is, its size should be adaptive.