Difference in behavior between Source Folder and Image File

4 posts

Tim L
1 hour ago

I tried both Source Folder and Image File usage. Fun fact from my testing.

Source Folder
File changes would get immediate updates to the other side, e.g. RAM Drive has file changes, updates Source Folder; Source Folder has file changes, updates RAM Drive.

Image File
RAM Drive has file changes, Image file would not update immediately. Image file got updated until the advanced option has been set, e.g. Save changes every minutes [60], which means file changes wait for the next round of Image saving.

Is it normal? Or something I missed?

Andrew SoftPerfect
1 hour ago

Yes, this is normal, and both modes actually save the same way. It only looks different because of how folder mirroring works.

When a volume mirrors a folder, say C:\Example on R:\, the folder is renamed to a hidden copy C:\Example.ramfs and C:\Example becomes a junction pointing to the RAM FS volume. So while the volume is mounted, C:\Example and R:\ are the same files in RAM, which is why a change made through one path shows up instantly through the other. Nothing is being copied there, both paths lead to the same place and when you click C:\Example you are actually seeing the RAM FS volume.

The copy on disk is the hidden C:\Example.ramfs folder, and it is updated exactly like an image file: on demand, every N minutes if Save contents every N minutes is set, at dismount and at shutdown. At dismount the junction is removed and the hidden copy is renamed back to C:\Example with all the changes in it.

Tim L
58 minutes ago

Thanks for replying fast.

I have a new question here. While I set R: to use Source Folder mode, where is the *.ramfs image file? Is the file handled by the SoftPerfect application?

Andrew SoftPerfect
42 minutes ago

There is no image file in source folder mode. The two modes keep your data on disk in different ways, and the chart below shows both side by side:

  • Image file: everything on the volume is packed into one single file on disk. You choose where that file goes when you create the volume.
  • Source folder: there is no extra file. Your folder stays an ordinary folder with ordinary files, and the changes are written back into it.

Example.ramfs is that original folder, only renamed while the volume is mounted, so that C:\Example can point to the RAM FS volume instead. You will not see it in Explorer by default because RAM FS marks it hidden and system. If you untick Hide protected operating system files in Explorer's folder options, it shows up next to C:\Example. RAM FS holds it while mounted so it cannot be moved or deleted, and renames it back to C:\Example at dismount.

In short, this is what happens to the folder:

  1. At mount, C:\Example is loaded into RAM, then renamed to C:\Example.ramfs and marked hidden.
  2. Its old place is taken by a junction, a pointer that leads to the RAM FS volume, so C:\Example now opens the files in RAM.
  3. On each save, the changes are written into the hidden C:\Example.ramfs.
  4. At dismount, the junction is removed and C:\Example.ramfs is renamed back to C:\Example, with all the changes in it.
Reply
Shown with your post. Sign in to keep the same name every time.
(optional, never shown)
Only needed if you want notifications about replies.
Drag files here, paste a screenshot, or . Images up to 10 MB. Text, log and zip files up to 2 MB. Up to 5 files per post.
You can edit your post until someone replies.