Undocumented
Class | FilesAttachmentFolder |
Undocumented |
Class | FilesLayout |
Layout is responsible for mapping between pages and files. This is the most basic version, where each page maps to the like-named file. |
Class | NotebookLayout |
Undocumented |
Function | decode_filename |
Decodes a filename to a pagename |
Function | encode_filename |
Encode a pagename to a filename |
Constant | FILE_TYPE_ATTACHMENT |
Undocumented |
Constant | FILE_TYPE_PAGE_SOURCE |
Undocumented |
Function | _url_decode |
Undocumented |
Variable | _fs_encoding |
Undocumented |
Variable | _url_decode_re |
Undocumented |
Decodes a filename to a pagename
Reverse operation of encode_filename()
.
Parameters | |
filename | the filename as string or unicode object |
Returns | |
the pagename as unicode object |
Encode a pagename to a filename
Since the filesystem may use another encoding than UTF-8 it may not be able to use all valid page names directly as file names. Therefore characters that are not allowed for the filesystem are replaced with url encoding. The result is still unicode, which can be used to construct a File
object. (The File object implementation takes care of actually encoding the string when needed.)
Namespaces are mapped to directories by replacing ":" with "/".
Parameters | |
pagename | the pagename as string or unicode object |
Returns | |
the filename as unicode object but with characters incompatble with the filesystem encoding replaced |