Uranium
Application Framework
Loading...
Searching...
No Matches
UM.FileHandler.WriteFileJob.WriteFileJob Class Reference
Inheritance diagram for UM.FileHandler.WriteFileJob.WriteFileJob:
UM.Job.Job

Public Member Functions

None __init__ (self, Optional[FileWriter] writer, Union[io.BytesIO, io.StringIO] stream, Any data, int mode)
 
None setFileName (self, str name)
 
str getFileName (self)
 
Union[io.BytesIO, io.StringIO] getStream (self)
 
None setMessage (self, Message message)
 
Optional[MessagegetMessage (self)
 
None setAddToRecentFiles (self, bool value)
 
bool getAddToRecentFiles (self)
 
None run (self)
 
- Public Member Functions inherited from UM.Job.Job
Any getResult (self)
 
None setResult (self, Any result)
 
None setError (self, Exception error)
 
None start (self)
 
None cancel (self)
 
bool isRunning (self)
 
bool isFinished (self)
 
bool hasError (self)
 
Optional[Exception] getError (self)
 

Protected Member Functions

None _onFinished (self, Job job)
 
None _onProgress (self, Job job, float amount)
 

Protected Attributes

 _stream
 
 _writer
 
 _data
 
 _file_name
 
 _mode
 
 _add_to_recent_files
 
 _message
 
 _onProgress
 
 _onFinished
 
- Protected Attributes inherited from UM.Job.Job
 _running
 
 _finished
 
 _result
 
 _message
 
 _error
 

Additional Inherited Members

- Static Public Member Functions inherited from UM.Job.Job
None yieldThread ()
 
- Static Public Attributes inherited from UM.Job.Job
 finished = Signal()
 
 progress = Signal()
 

Detailed Description

A Job subclass that performs writing.

The writer defines what the result of this job is.

Constructor & Destructor Documentation

◆ __init__()

None UM.FileHandler.WriteFileJob.WriteFileJob.__init__ ( self,
Optional[FileWriter] writer,
Union[io.BytesIO, io.StringIO] stream,
Any data,
int mode )
Creates a new job for writing.

:param writer: The file writer to use, with the correct MIME type.
:param stream: The output stream to write to.
:param data: Whatever it is what we want to write.
:param mode: Additional information to send to the writer, for example: such as whether to
write in binary format or in ASCII format.

Reimplemented from UM.Job.Job.

Member Function Documentation

◆ run()

None UM.FileHandler.WriteFileJob.WriteFileJob.run ( self)
Perform the actual task of this job. Should be reimplemented by subclasses.

:exception NotImplementedError

Reimplemented from UM.Job.Job.


The documentation for this class was generated from the following file: