maxon.Url

Description

Reference class of maxon.UrlInterface.

Inheritance diagram

Inheritance

Parent Class:

Methods Signature

GetBrowseIterator(flags)

Returns a dedicated IoBrowseIterator with the browse iterator internally

GetBrowseRef()

Returns the pure browse iterator

GetData(idValue[, default])

Retrieves the data stored at the given url.

GetHashCode()

Return the hashcode of an url.

IoCopyFile(dest, overwrite, removeReadOnly)

Copies a file to a different location, the path must exist otherwise the function returns an error.

IoCreateDirectory(createParents[, createdDirs])

Creates a new directory.

IoDelete(force[, recursive])

Deletes a file or directory physically on the medium.

IoDetect()

Detects the type of the object behind maxon.Url.

IoGetAttributes()

Returns the file attributes of the object behind maxon.Url.

IoGetTime(mode)

Returns the maxon.DateTime of the current file.

IoMove(destName)

Moves a file or directory (including hierarchy) to a different location, the path must exist otherwise

IoRename(newName)

Renames a file or directory.

OpenConnection()

Returns a reference to a maxon.IoConnectionInterface class of this Url.

OpenInputStream([flags])

Returns a reference to a maxon.InputStreamInterface class of this maxon.Url.

OpenOutputStream([flags])

Returns a reference to a maxon.OutputStreamInterface class of this maxon.Url.

__init__([urlOrScheme, scheme, authority, …])

Initialize self.

Methods Definition

Url.GetBrowseIterator(flags)

Returns a dedicated IoBrowseIterator with the browse iterator internally

Url.GetBrowseRef()

Returns the pure browse iterator

Url.GetData(idValue, default=None)

Retrieves the data stored at the given url.

Parameters
  • idValue (maxon.Id) – The id where to find the data.

  • default (Any) – The default value if the data is not found

Returns

Url.GetHashCode()

Return the hashcode of an url.

Returns

The hashcode.

Return type

int

Url.IoCopyFile(dest, overwrite, removeReadOnly)

Copies a file to a different location, the path must exist otherwise the function returns an error.

Parameters
  • dest (maxon.Url) – Destination name for the copy operation.

  • overwrite (bool) – Set to True to allow overwriting destName file if it was already there.

  • removeReadOnly (bool) – Set to True to remove the read only flag on the newly created copy.

Url.IoCreateDirectory(createParents, createdDirs=None)

Creates a new directory. The function will return false if the directory already exists.

Parameters
  • createParents (bool) – Check if parent directory exists and if not create them recursively.

  • createdDirs (maxon.BaseArray (maxon.Url)) –

    An array that will contain all newly created subdirectories in the order in which they were created.
    If this parameter is None it will be ignored.

Returns

Url.IoDelete(force, recursive=False)

Deletes a file or directory physically on the medium.

Parameters
  • force (bool) – Set to True tries to deletes the file/directory even if the file/directory has read only flags set.

  • recursive (bool) – Recursively deletes a directory and its content. If a file is specified this value is ignored.

Url.IoDetect()

Detects the type of the object behind maxon.Url. This allows to check if a file or directory exists.

Returns

IODETECT of the given maxon.Url.

Return type

maxon.IODETECT

Url.IoGetAttributes()

Returns the file attributes of the object behind maxon.Url.

Returns

The file attribute.

Return type

maxon.IOATTRIBUTES

Url.IoGetTime(mode)

Returns the maxon.DateTime of the current file. The time is in local time.

Parameters

mode (maxon.IOTIMEMODE) – IOTIMEMODE of the requested time.

Returns

Returns the DateTime or an error.

Return type

maxon.UniversalDateTime

Url.IoMove(destName)
Moves a file or directory (including hierarchy) to a different location, the path must exist otherwise the function returns an error.
If the destName file or directory does already exist the function returns with an error.
Moving a file or directory on the same partition will perform without a temporary copy.
Parameters

destName (maxon.Url) – Destination name for the move operation.

Url.IoRename(newName)

Renames a file or directory. The newName must not be the name of an existing file or directory.

Parameters

newName (maxon.Url) – New name for the rename operation.

Url.OpenConnection()

Returns a reference to a maxon.IoConnectionInterface class of this Url.

Returns

The pointer to the maxon.IoConnectionInterface. Can be None.

Return type

maxon.IoConnectionRef

Url.OpenInputStream(flags=maxon.OPENSTREAMFLAGS.NONE)

Returns a reference to a maxon.InputStreamInterface class of this maxon.Url.

Parameters

flags (See OPENSTREAMFLAGS for details.) – maxon.OPENSTREAMFLAGS

Returns

The reference to the maxon.InputStreamInterface. Can be None.

Return type

maxon.InputStreamRef

Url.OpenOutputStream(flags=maxon.OPENSTREAMFLAGS.NONE)

Returns a reference to a maxon.OutputStreamInterface class of this maxon.Url.

Parameters

flags (See OPENSTREAMFLAGS for details.) – maxon.OPENSTREAMFLAGS

Returns

The reference to the maxon.OutputStreamInterface. Can be None.

Return type

maxon.OutputStreamRef

Url.__init__(urlOrScheme=None, scheme=None, authority=None, path=None, name=None)

Initialize self. See help(type(self)) for accurate signature.