maxon.Url¶
Description¶
Reference class of maxon.UrlInterface
.
Methods Signature¶
|
Returns a dedicated IoBrowseIterator with the browse iterator internally |
Returns the pure browse iterator |
|
|
Retrieves the data stored at the given url. |
Return the hashcode of an url. |
|
|
Copies a file to a different location, the path must exist otherwise the function returns an error. |
|
Creates a new directory. |
|
Deletes a file or directory physically on the medium. |
|
Detects the type of the object behind |
Returns the file attributes of the object behind |
|
|
Returns the |
|
Moves a file or directory (including hierarchy) to a different location, the path must exist otherwise
|
|
Renames a file or directory. |
Returns a reference to a |
|
|
Returns a reference to a |
|
Returns a reference to a |
|
Appends a relative string or a |
|
Returns the hash code of an Url. |
|
Creates and stores internally the reference of the C++ Data.
|
|
Appends a relative string or a |
|
Returns the string representation of an Url using the StringInterface.ToString method. |
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
-
Url.
IoGetAttributes
()¶ Returns the file attributes of the object behind
maxon.Url
.- Returns
The file attribute.
- Return type
-
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
-
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
-
Url.
OpenInputStream
(flags=<OPENSTREAMFLAGS.NONE: 0>)¶ Returns a reference to a
maxon.InputStreamInterface
class of thismaxon.Url
.- Parameters
flags (See OPENSTREAMFLAGS for details.) –
maxon.OPENSTREAMFLAGS
- Returns
The reference to the
maxon.InputStreamInterface
. Can be None.- Return type
-
Url.
OpenOutputStream
(flags=<OPENSTREAMFLAGS.NONE: 0>)¶ Returns a reference to a
maxon.OutputStreamInterface
class of thismaxon.Url
.- Parameters
flags (See OPENSTREAMFLAGS for details.) –
maxon.OPENSTREAMFLAGS
- Returns
The reference to the
maxon.OutputStreamInterface
. Can be None.- Return type
-
Url.
__add__
(s)¶ Appends a relative string or a
maxon.Url
to the current one.Note
If the Url is file:///c:/directory a call of
url.Append(maxon.Url("test/file.txt"))
will result in file:///c:/directory/test/file.txt.
-
Url.
__hash__
()¶ Returns the hash code of an Url.
-
Url.
__init__
(urlOrScheme=None, scheme=None, authority=None, path=None, name=None)¶ - Creates and stores internally the reference of the C++ Data.When the passed data is None, an empty data is still allocated.
- Parameters
data (Optional[Data]) – An optional c++ data used to hold the C++ reference alive during the whole lifetime of this python object.
-
Url.
__radd__
(s)¶ Appends a relative string or a
maxon.Url
to the current one.Note
If the Url is file:///c:/directory a call of
url.Append(maxon.Url("test/file.txt"))
will result in file:///c:/directory/test/file.txt.
-
Url.
__str__
()¶ Returns the string representation of an Url using the StringInterface.ToString method.
- Return type
str