maxon.IoConnectionInterface¶
Description¶
maxon.Url
.Methods Signature¶
|
Returns a
maxon.IoBrowseInterface class to browse through all children of an Url. |
Returns length of the content. |
|
|
Returns the corresponding |
|
Copies a file to a different location, the path must exist otherwise the function returns an error. |
|
Creates a new directory. |
|
Deletes the file physically on the medium. |
|
Detects the type of the
maxon.Url . |
Returns the file attributes. |
|
Calculates the free space on a volume. |
|
|
Returns the
maxon.DateTime of the current file. |
|
Moves a file or directory (including hierarchy) to a different location.
|
|
Renames a file or directory. |
|
Modify the file attributes. |
|
Modifies the |
|
Opens or shows the file in the systems explorer (desktop/finder).
|
|
Opens an
maxon.InOutputStreamRef for the given connection. |
|
Opens an
maxon.InputStreamRef for the given connection. |
|
Opens an
maxon.OutputStreamRef for the given connection. |
Methods Definition¶
-
IoConnectionInterface.
GetBrowseIterator
(flags)¶ - Returns a
maxon.IoBrowseInterface
class to browse through all children of an Url.The return value needs to be checked against None.- Parameters
flags (
maxon.GETBROWSEITERATORFLAGS
) – Defines how the iterator resolve data.- Returns
The iterator.
- Return type
-
IoConnectionInterface.
GetContentLength
()¶ Returns length of the content.
- Returns
The effective size in bytes of the
maxon.IoConnectionInterface
(e.g. filesize).- Return type
int
-
IoConnectionInterface.
GetUrl
()¶ Returns the corresponding
maxon.Url
connected to themaxon.IoConnectionRef
. :return: Returns the name of the connection. :rtype:maxon.Url
-
IoConnectionInterface.
IoCopyFile
(destName, overwrite, removeReadOnly)¶ Copies a file to a different location, the path must exist otherwise the function returns an error.
- Parameters
destName (
maxon.Url
) – Destination name for the copy operation.overwrite (bool) – True to allow overwriting destName file if it was already there.
removeReadOnly (bool) – True to remove the read only flag on the newly created copy.
-
IoConnectionInterface.
IoCreateDirectory
(createParents, createDirs=None)¶ Creates a new directory.
Note
The function returns false if the directory already exists.
- Parameters
createParents (bool) – Check if parent directory exists and if not create them recursively.
createDirs (
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.
-
IoConnectionInterface.
IoDelete
(force)¶ Deletes the file physically on the medium.
- Parameters
force – True tries to deletes the file/directory even if the file/directory has read only flags set.
- Returns
True if the file/directory could be removed successfully.
- Return type
bool
-
IoConnectionInterface.
IoDetect
()¶ - Detects the type of the
maxon.Url
.This allows to check if a file or directory exists.- Returns
Flags defining the detection state.
- Return type
-
IoConnectionInterface.
IoGetAttributes
()¶ Returns the file attributes.
- Returns
IOATTRIBUTES of the files.
- Return type
-
IoConnectionInterface.
IoGetFreeVolumeSpace
()¶ Calculates the free space on a volume.
Note
The
maxon.Url
can point to a volume or directory.- Returns
In the next order:
The number of available bytes on the volume.
The total size of the volume in bytes.
- Return type
tuple(int, int)
-
IoConnectionInterface.
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
maxon.DateTime
or an error.- Return type
-
IoConnectionInterface.
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.
-
IoConnectionInterface.
IoRename
(newName)¶ Renames a file or directory.
Warning
The newName must not be the name of an existing file or directory.
- Parameters
newName – New name for the rename operation.
newName –
maxon.Url
- Returns
-
IoConnectionInterface.
IoSetAttributes
(flags, mask)¶ Modify the file attributes.
- Parameters
flags – Flags to set/clear.
flags –
maxon.IOATTRIBUTES
mask – Mask with all flags to be changed.
mask –
maxon.IOATTRIBUTES
-
IoConnectionInterface.
IoSetTime
(mode, dateTime)¶ Modifies the
maxon.DateTime
of the current file. the time is in local time.- Parameters
mode (
maxon.IOTIMEMODE
) – IOTIMEMODE of the requested time.dateTime (
maxon.UniversalDateTime
) – New datetime for the file.
-
IoConnectionInterface.
IoShowInOS
(flags)¶ - Opens or shows the file in the systems explorer (desktop/finder).Under windows that would be on the desktop/explorer.Under OSX this would be the Finder.Depending on the url scheme this could also open another browser.
- Parameters
flags (
maxon.IOSHOWINOSFLAGS
) – Flags to define how to show/open that file.
-
IoConnectionInterface.
OpenInOutputStream
(flags=<OPENSTREAMFLAGS.NONE: 0>)¶ - Opens an
maxon.InOutputStreamRef
for the given connection.With this kind of streams it’s possible to read/write to it.- Parameters
flags (
maxon.OPENSTREAMFLAGS
) – Defines how the stream will be handled.- Returns
An input stream, should be free with
ObjectInterface.Free()
.- Return type
-
IoConnectionInterface.
OpenInputStream
(flags=<OPENSTREAMFLAGS.NONE: 0>)¶ - Opens an
maxon.InputStreamRef
for the given connection.With this kind of streams it’s only possible to read from it.- Parameters
flags (
maxon.OPENSTREAMFLAGS
) – Defines how the stream will be handled.- Returns
An input stream, should be free with
ObjectInterface.Free()
.- Return type
-
IoConnectionInterface.
OpenOutputStream
(flags=<OPENSTREAMFLAGS.NONE: 0>)¶ - Opens an
maxon.OutputStreamRef
for the given connection.With this kind of streams it’s only possible to write to it.- Parameters
flags (
maxon.OPENSTREAMFLAGS
) – Defines how the stream will be handled.- Returns
An input stream, should be free with
ObjectInterface.Free()
.- Return type