maxon.IoHandlerInterface¶
Description¶
Methods Signature¶
GetHandlerForScheme(scheme) |
Returns the maxon.IoHandler which is responsible for the given scheme. |
GetSystemPath(url) |
Translates a maxon.Url to a OS or handler-specific system path. |
GetUrlScheme() |
Returns the url scheme to use in Urls for this handler (such as “file” if this is the IoHandler for the file system). |
IoNormalize(*args) |
IoNormalize(self, flags=maxon.NORMALIZEFLAGS.SCHEME_BASED): Returns a normalized maxon.Url. |
OpenConnection(url) |
Opens a connection and returns the specified maxon.IoConnectionRef handler for this type of protocol. |
RemoveUrl(url) |
Removes the last part of the given url and returns the parent url. |
SetSystemPath(self, url, systemPath) |
Converts an OS or handler-specific system path to a maxon.Url. |
Methods Definition¶
-
static
IoHandlerInterface.GetHandlerForScheme(scheme)¶ Returns the
maxon.IoHandlerwhich is responsible for the given scheme. Themaxon.IoHandleris searched for at the IoHandlers registry.Parameters: scheme ( maxon.Url) – Themaxon.Urlscheme for which the matching IoHandler shall be found.Returns: The matching IoHandler, or a null reference. Return type: maxon.IoHandlerRaises: LookupError – If the searched scheme can’t be found in the “net.maxon.registry.iohandlers” registry.
-
IoHandlerInterface.GetSystemPath(url)¶ Translates a
maxon.Urlto a OS or handler-specific system path.Parameters: url ( maxon.Url) – Themaxon.Urlto translate.Returns: The generated path. Return type: str
-
IoHandlerInterface.GetUrlScheme()¶ Returns the url scheme to use in Urls for this handler (such as “file” if this is the IoHandler for the file system).
Returns: Url scheme of this handler. Return type: maxon.Url
-
IoHandlerInterface.IoNormalize(*args)¶ IoNormalize(self, flags=maxon.NORMALIZEFLAGS.SCHEME_BASED): Returns a normalized
maxon.Url. If the normalizedmaxon.Urlis a link, themaxon.IoHandlercan resolve it (if supported).Note
The file:/// handler resolves symbolic links, where the http:// handler does not resolve links.
Parameters: flags ( maxon.NORMALIZEFLAGS) – Flags to define type of normalization.Returns: The normalized maxon.Url.Return type: maxon.Url
-
IoHandlerInterface.OpenConnection(url)¶ Opens a connection and returns the specified
maxon.IoConnectionRefhandler for this type of protocol.Parameters: url ( maxon.Url) –maxon.Urlof the connection to open.Returns: A reference to the specialized maxon.IoConnectionRef.Return type: maxon.IoConnectionRef