The DiscLayout object provides a way for recording all or a portion of DiscArchive content on a single disc.
More...
Inherits IDisposable.
|
bool | Close () |
| Finalizes the write operations.
|
|
void | Dispose () |
| Disposes DiscLayout and reclaims the resources used by the object.
|
|
bool | Open () |
| Prepares the DiscLayout object for recording the selected content and footer to the target medium.
|
|
void | SetFooter (DataFile footer) |
| The method sets a layout describing the "footer" to be recorded after the DiscLayout.WriteContent operation finishes.
|
|
bool | WriteContent () |
| Writes the selected content on the target medium.
|
|
bool | WriteFileSystem () |
| Writes the file system describing the content of the disc.
|
|
bool | WriteFileSystem (bool dismountVolume) |
| Writes the file system describing the content of the disc.
|
|
bool | WriteFooter () |
| Writes the selected footer on the target medium.
|
|
|
DataFile | Content [get] |
| Gets the layout that will be written on the target medium.
|
|
DataFile | ContentOnDisc [get] |
| Gets the description of the layout already present on the target medium before the current layout is written to it.
|
|
Device | Device [get, set] |
| Gets/Sets the device that this object will use.
|
|
ErrorInfo | Error [get] |
| The error information for the last DiscLayout operation.
|
|
DataFile | Footer [get] |
| Gets a DatFile object defining the content of the footer to be recorded after the layout content goes on disc.
|
|
Int32 | ImageSize [get] |
| Returns the number of blocks needed on the target medium to write the selected content and footer.
|
|
Int32 | MediaFreeSpace [get] |
| Returns the available space in blocks on the target medium before calling any of the write methods.
|
|
Int32 | SessionStartAddress [get, set] |
| Gets/sets the address at which content recording will begin on the target medium.
|
|
string | VolumeLabel [get, set] |
| Gets/sets the new volume label that will be set on the target medium when DiscLayout.WriteFileSystem method is called.
|
|
The DiscLayout object provides a way for recording all or a portion of DiscArchive content on a single disc.
A DiscLayout object may be obtained only by calling DiscArchive.PrepareLayout method on a source DiscArchive object. Once obtained the DiscLayout is responsible for writing its content and footer on the target medium, as well as the file system that describes the recorded content and footer.
The following example is a simple demonstration of how DiscArchive and DiscLayout classes can be used:
Device device = deviceEnumerator.CreateDevice(deviceIndex,
true);
{
archive.Content = content;
archive.Footer = footer;
{
{
{
}
}
}
}
The DataFile interface represents one file or directory from a data image.
Definition DataFile.cs:167
Recording Device Low Level Application Programming Interface.
Definition Device.cs:183
void Refresh()
The Refresh method re-reads disc information.
Definition Device.cs:1348
DiscArchive object provides a way for constructing large file trees and scheduling them for burning o...
Definition DiscArchive.cs:133
bool PrepareArchive()
Call this method to initialize the archiving process and prepare the content for burning.
Definition DiscArchive.cs:337
DiscLayout PrepareLayout(Device device, bool keepExistingContent)
Call this method to select a portion of or the entire archive for burning.
Definition DiscArchive.cs:378
bool HasNextDisc
Check the value of this property to see if there are more files/folders that need to be recorded on a...
Definition DiscArchive.cs:349
bool CommitLayout(DiscLayout layout)
If the recording of the selected layout is successful, call this method to inform DiscArchive that th...
Definition DiscArchive.cs:401
The DiscLayout object provides a way for recording all or a portion of DiscArchive content on a singl...
Definition DiscLayout.cs:121
bool WriteContent()
Writes the selected content on the target medium.
Definition DiscLayout.cs:425
bool Open()
Prepares the DiscLayout object for recording the selected content and footer to the target medium.
Definition DiscLayout.cs:412
bool WriteFileSystem()
Writes the file system describing the content of the disc.
Definition DiscLayout.cs:464
bool Close()
Finalizes the write operations.
Definition DiscLayout.cs:503
bool WriteFooter()
Writes the selected footer on the target medium.
Definition DiscLayout.cs:441
- See also
- PrimoSoftware.Burner.DiscArchive, DiscLayout.WriteContent, DiscLayout.WriteFooter, DiscLayout.WriteFileSystem
◆ Close()
Finalizes the write operations.
Call this method after DiscLayout.WriteFileSystem to complete the write sequence.
- Returns
- true - the operation succeeded; false otherwise.
- Exceptions
-
ObjectDisposedException | The DiscLayout object was previously disposed. |
- See also
- DiscLayout.WriteFileSystem, DiscLayout.Open
◆ Open()
Prepares the DiscLayout object for recording the selected content and footer to the target medium.
Call this method before calling DiscLayout.WriteContent, DiscLayout.WriteFooter and DiscLayout.WriteFileSystem
- Returns
- true - Success.
false - Failure. Check DiscLayout.Error property.
- See also
- DiscLayout.WriteContent, DiscLayout.WriteFooter, DiscLayout.WriteFileSystem, DiscLayout.Close
- Exceptions
-
ObjectDisposedException | The DiscLayout object was previously disposed. |
◆ SetFooter()
The method sets a layout describing the "footer" to be recorded after the DiscLayout.WriteContent operation finishes.
- Parameters
-
footer | A DataFile layout containing the desired footer content |
Call this method before calling DiscLayout.Open
- See also
- DiscLayout.WriteContent, DiscLayout.Footer
- Exceptions
-
ObjectDisposedException | The DiscLayout object was previously disposed. |
◆ WriteContent()
Writes the selected content on the target medium.
- Returns
- true - the operation succeeded; false otherwise.
- Exceptions
-
ObjectDisposedException | The DiscLayout object was previously disposed. |
- See also
- DiscLayout.Content
◆ WriteFileSystem() [1/2]
Writes the file system describing the content of the disc.
The file system is automatically determined based on the written content and footer as well as any previously loaded data
(from previous recording sessions). This method must be called after the content and footer are written (DiscLayout.WriteContent and DiscLayout.WriteFooter), otherwise unwanted results may occur.
The media volume will not be automatically dismounted after the write operation finishes.
- Returns
- true - the operation succeeded; false otherwise.
- Exceptions
-
ObjectDisposedException | The DiscLayout object was previously disposed. |
- See also
- DiscLayout.Content, DiscLayout.Footer, DiscLayout.WriteContent, DiscLayout.WriteFooter
References DiscLayout.WriteFileSystem().
Referenced by DiscLayout.WriteFileSystem().
◆ WriteFileSystem() [2/2]
bool WriteFileSystem |
( |
bool |
dismountVolume | ) |
|
Writes the file system describing the content of the disc.
- Parameters
-
dismountVolume | Indicates whether to dismount the volume after the burning. The default value of this parameter is false. |
The file system is automatically determined based on the written content and footer as well as any previously loaded data
(from previous recording sessions). This method must be called after the content and footer are written (DiscLayout.WriteContent and
DiscLayout.WriteFooter), otherwise unwanted results may occur.
- Returns
- true - the operation succeeded; false otherwise.
- Exceptions
-
ObjectDisposedException | The DiscLayout object was previously disposed. |
- See also
- DiscLayout.Content, DiscLayout.Footer, DiscLayout.WriteContent, DiscLayout.WriteFooter
◆ WriteFooter()
Writes the selected footer on the target medium.
If no footer is selected for the current layout this method has no effect.
- Returns
- true - the operation succeeded; false otherwise.
- Exceptions
-
ObjectDisposedException | The DiscLayout object was previously disposed. |
- See also
- DiscLayout.Footer
◆ Content
Gets the layout that will be written on the target medium.
- See also
- DiscArchive.Content
- Exceptions
-
ObjectDisposedException | The DiscLayout object was previously disposed. |
◆ ContentOnDisc
Gets the description of the layout already present on the target medium before the current layout is written to it.
- Exceptions
-
ObjectDisposedException | The DiscLayout object was previously disposed. |
◆ Error
The error information for the last DiscLayout operation.
- See also
- ErrorInfo, DiscLayoutError
◆ Footer
Gets a DatFile object defining the content of the footer to be recorded after the layout content goes on disc.
When a DiscLayout object is created using DiscArchive.PrepareLayout method, its footer is a copy of the footer defined originally for the DiscArchive object. It is still possible to define a different footer for each DiscLayout object, despite the fact that one may already be set in the source DiscArchive object.
- See also
- DiscArchive.Footer, DiscLayout.SetFooter
- Exceptions
-
ObjectDisposedException | The DiscLayout object was previously disposed. |
◆ ImageSize
Returns the number of blocks needed on the target medium to write the selected content and footer.
Use this property after calling DiscLayout.Open, otherwise it will return 0.
◆ MediaFreeSpace
Returns the available space in blocks on the target medium before calling any of the write methods.
Use this property after calling DiscLayout.Open, otherwise it will return 0.
◆ SessionStartAddress
Int32 SessionStartAddress |
|
getset |
Gets/sets the address at which content recording will begin on the target medium.
Modifying the value of this property (if necessary) should be done before calling DiscLayout.Open.
- Exceptions
-
ObjectDisposedException | The DiscLayout object was previously disposed. |
◆ VolumeLabel
Gets/sets the new volume label that will be set on the target medium when DiscLayout.WriteFileSystem method is called.
- See also
- DiscLayout.WriteFileSystem
- Exceptions
-
ObjectDisposedException | The DiscLayout object was previously disposed. |
◆ OnContinueWrite
Raised to check if burning should continue.
The event handler receives an argument of type DiscLayout_ContinueWriteEventArgs containing data related to this event.
Note: The event gets fired for each file from the layout after it is recorded on the target medium. While a file is being recorded this event not will fire.
- See also
- DiscLayoutContinueWriteEventArgs
◆ OnFileComplete
Raised when a specific file from the layout is written on the target medium.
- See also
- DiscLayoutFileEventArgs
◆ OnFileError
Raised when a specific file from the layout cannot be written on the target medium due to file access/read errors.
- See also
- DiscLayoutFileEventArgs
◆ OnProgress
Raised to report the number of blocks written to the target medium.
The event handler receives an argument of type DiscLayout_ProgressEventArgs containing data related to this event.
- See also
- DiscLayoutProgressEventArgs