File placement is the operation of creating or moving a new file node in the filesystem tree.
A file can be placed relative to another file.
The full list of placement modifiers:
AFTER APPEND BEFORE FORCE PREPEND RENAME TYPESAFE TYPESAFE_IF_POSSIBLE
You must always specify the placement direction:
BEFOREplaces the file before the target file, in the same bucket as its previous sibling.
AFTERplaces the file after the target file, in the same bucket as its next sibling.
PREPENDplaces the file into the target file, to the beginning of a bucket. The bucket is either provided, is automatically calculated, or defaults to
APPENDplaces the file into the target file, to the end of a bucket. The bucket is either provided, is automatically calculated, or defaults to
If a file already exists at the target location, it may be resolved in 1 of 3 ways:
RENAMEinstructs the system to find a name that doesn’t conflict. This typically means suffixing the name with
-2or similar, though file extensions are respected, so
FORCEremoves the conflicting file and proceeds with the placement.
Applications define what kind of files they support. For example, a gallery may display images but no zip files. The application is said to accept files that it supports. (See .Accept rules.) In such cases, the placement is typesafe, otherwise it’s not.
When placing a file, we can instruct Boomla to consider typesafety in one of the following ways:
TYPESAFEinstructs the system to only place the file if the placement is typesafe. Otherwise, the operation shall fail. When using
PREPEND, this flag will instruct Boomla to find the first accepting bucket so that the operation can succeed in a typesafe manner.
TYPESAFE_IF_POSSIBLE is only effective for
PREPEND operations. It instructs the system to try placing the file in a typesafe manner. If that is not possible, place the file anyway. The following steps are taken: