A maxon::Url defines the location of a file or a similar resource. The class allows to construct a file path and to handle files. maxon::Url is based on maxon::UrlInterface.
A maxon::Url can be constructed with:
Various default folders can be obtained from the maxon::Application class:
See also Application Manual.
An URL can reference files on the file system, web addresses, files within ZIP files, etc. The scheme defines what kind of object a given maxon::Url is referencing:
The supported maxon::UrlScheme types are: Schemes exposed in url.h :
Scheme | Description |
---|---|
maxon::URLSCHEME_FILESYSTEM | Scheme identifier for generic file system access. |
maxon::URLSCHEME_RELATIVE | Scheme identifier for relative Urls which can be resolved with maxon::Url::IoNormalize. |
maxon::URLSCHEME_NETWORK | Scheme identifier for handling network drive access of a system. |
maxon::URLSCHEME_STORAGE | Scheme identifier for handling storage device access on a system. |
maxon::URLSCHEME_VOLUME | Scheme identifier for handling local drive access of a system. |
maxon::URLSCHEME_ZIPFILE | Scheme identifier for handling zip archive access. |
maxon::URLSCHEME_GZIPFILE | Scheme identifier for handling zip archive access. |
maxon::URLSCHEME_APK_ASSET | Scheme identifier for the Android Package (apk) file format. |
maxon::URLSCHEME_CRYPTOFILE | Scheme identifier for en- and decryption streams. |
maxon::URLSCHEME_CACHE | Scheme identifier for handling temporary file systems to accelerate file IO. |
maxon::URLSCHEME_MEMORY | Scheme identifier for handling memory files. |
maxon::URLSCHEME_MEMORYFILESTRUCT | Scheme identifier for MemoryFileStruct streams. |
maxon::URLSCHEME_RAMDISK | Scheme identifier for virtual file systems in RAM. |
maxon::URLSCHEME_TCP | Scheme identifier for Transmission Control Protocol (TCP) connections. |
maxon::URLSCHEME_WS | Scheme identifier for WebSocket connections. |
maxon::URLSCHEME_WSS | Scheme identifier for SSL encrypted WebSocket connections. |
maxon::URLSCHEME_FTP | Scheme identifier for File Transfer Protocol (FTP) connections. |
maxon::URLSCHEME_SFTP | Scheme identifier for Secure/SSH File Transfer Protocol (SFTP) connections. |
maxon::URLSCHEME_HTTP | Scheme identifier for Hypertext Transfer Protocol (HTTP) connections. |
maxon::URLSCHEME_HTTPS | Scheme identifier for Hypertext Transfer Protocol Secure (HTTPS) connections. |
maxon::URLSCHEME_PERFORCE | Scheme identifier for Perforce access. |
maxon::URLSCHEME_AUTHORITY | Scheme identifier for storing authority information within the type maxon::Url. |
maxon::URLSCHEME_HANDLER | Scheme identifier for the default scheme implementation. |
maxon::URLSCHEME_PIPE | Scheme identifier for inter-process communication. |
maxon::URLSCHEME_STDERR | Scheme identifier for redirecting outputs to stderr . |
maxon::URLSCHEME_STDIN | Scheme identifier for redirecting inputs to stdin . |
maxon::URLSCHEME_STDOUT | Scheme identifier for redirecting outputs to stdout . |
Unexposed or outside of url.h exposed schemes:
Scheme | Description |
---|---|
maxon::URLSCHEME_UNCFILESYSTEM | Scheme identifier for Uniform Naming Convention (UNC) network resource access. Currently not exposed, uses the identifier "unc" . |
maxon::URLSCHEME_ASSET | Currently only exposed in assets.h . |
maxon::URLSCHEME_ASSETDB | Currently only exposed in assets.h . |
maxon::URLSCHEME_META | Currently only exposed in assets.h . |
maxon::URLSCHEME_METASQ | Currently only exposed in assets.h . |
An maxon::Url is composed of several parts. These parts can be accessed individually:
The maxon::Url class contains several functions to analyse and handle files:
Data streams are used to write into and read from a resource defined with a maxon::Url:
See also maxon::IoFileOutputHelper and maxon::IoFileInputHelper.
For details on input/output streams see InputStream Manual and OutputStream Manual.
maxon::URLFLAGS can be used to define maxon::Url attributes.
Miscellaneous functions are: