File addresses and the side-panel Preview

When DataMind Oda points at a file, it writes a file address for it: the name that carries the file's location together with the chat that may read it. The side panel works through these addresses when it opens a file as a preview and when it works out which file a link or a tab means. You will not normally see an address in full; this page covers what one holds, how it is written and read, and why some addresses cannot be opened. The preview itself is covered on Preview files in Oda, and following a link in a reply on Links and files in chat.

A file and its chat

An address holds two things:

The two kinds of address

KindWhat it carriesCan it be read?
An address for a chatThe chat that authorises the read, and the file's locationYes; it is read through that chat.
An absolute addressThe file's location onlyNo; nothing authorises the read.

The side panel opens addresses that carry a chat: a link from a reply is read through the chat the link carries. An absolute address cannot be read, so it does not become a preview. Oda does not fill in a chat to make one work, not even the chat you have open.

How the path is written

How an address is read

Read as text, never from the disk

Working out which file an address names, for display or for matching, is done on the address's text alone. Oda does not look at the disk to resolve an address, and it does not tidy the path along the way. One consequence: an address reads the same whether or not the file is still there, so only opening it can fail, and the chat reports that failure when it does.

In the side panel

Questions, answered

Which addresses can the side-panel Preview open?

An address that carries a chat, read through that chat. An absolute address cannot be opened: nothing authorises the read, so it does not become a preview, and Oda does not borrow the chat you have open to make it work. Preview files in Oda covers the preview itself.

What stays as written in a file address?

A full path keeps its leading slash, a drive letter stays as written, and a network share keeps its leading double slash. Separators are written as / throughout the address.

How does Oda read a file address?

Exactly, and once: a complete address is cut at its first ? or #, its parts are decoded a single time, and dot parts like .. are never followed. An address missing its chat or its file part, or carrying a part that does not decode, is not an address at all.

Does Oda check the disk when it reads a file address?

No. Working out which file an address names, for display or for matching, uses the address's text alone, so reading never touches the disk. An address reads the same whether or not the file is still there; only opening it can fail.

What happens when the file behind an address is gone?

The address still reads the same, because reading never checks the disk. Opening it is what fails, and the chat then shows that the file could not be opened (Links and files in chat).

Why can the same file have more than one address?

Because an address carries its chat. Each chat names a file it points at in its own right, so the same file reached from two chats has two addresses, and each chat keeps its own preview of it.

How is a file outside the chat's folder addressed?

It still travels in an address for that chat; its path inside the address is the full path, kept as written, not a path relative to the chat's folder.