@Hans
Quote:
What does FileSysBox provide that makes it easier?
TBH the list is quite long if you want me to list everything but a few things that come to mind:
- It correctly creates and handles AmigaDOS specific structures like volumes, locks and so forth.
- It enforces various AmigaDOS rules like not allowing seeks beyond the end of a file, not deleting a file or directory which has a lock on it, not allowing to truncate a file if there are other users with file positions that would end up beyond EOF and so on.
- Also it enforces some other rules like not allowing to create recursive directory loops by way of soft/hard links or by way of renaming a directory so that it becomes its own child.
- All relative paths are converted to absolute UNIX style paths with the filesystem root as root before they are passed to the FUSE callbacks.
- UNIX GMT timestamps are converted to AmigaDOS style date stamps in local time and vice versa.
- UNIX mode flags are converted to AmigaDOS protection flags and vice versa.
- If the file system supports xattrs then filesysbox can use them to support AmigaDOS specific metadata like additional protection flags (hspa) and comments (not applicable to ssh2-handler).
All the FUSE file system has to implement are some simple call back functions which in case of ssh2-handler are mostly thin wrappers around libssh2_sftp_*() functions, with exception of init() and exit() which have to deal with connecting to and disconnecting from the SSH server.