PrimoBurner for .NET  5.0
CD, DVD and Blu-ray Software Development Kit
Loading...
Searching...
No Matches
DataFile Class Reference

The DataFile interface represents one file or directory from a data image. More...

Public Member Functions

 DataFile ()
 Creates a new instance of DataFile class.
 
DataFile Find (string relativePath)
 Finds a file in a file tree.
 
DataFile Find (string relativePath, bool caseSensitive)
 Finds a file in a file tree.
 

Properties

DataFileList Children [get]
 Gets the list of child DataFile objects associated with this file.
 
DataSourceType DataSource [get, set]
 Gets/sets the file data source.
 
Int32 DiscAddress [get, set]
 Gets the file relative logical block address.
 
Int32 ExcludeMask [get, set]
 Gets/sets a value indicating the file system from which the DataFile entry will be excluded.
 
string FilePath [get, set]
 Gets/Sets the full path to the file with the data for this object.
 
Int64 FileSize [get, set]
 Gets/Sets the size of the file in bytes.
 
DateTime FileTime [get, set]
 Gets/Sets the file creation time.
 
Int32 HiddenMask [get, set]
 Gets/sets a value indicating for which file system is the hidden attribute set.
 
bool IsDirectory [get, set]
 Gets/sets a value indicating if this object is a directory.
 
string LongFilename [get, set]
 Gets/Sets the long filename.
 
DataFile Parent [get, set]
 Gets the file parent.
 
string ShortFilename [get, set]
 Gets/Sets the short filename.
 
System.IO.Stream Stream [get, set]
 Gets/sets a data stream that should be used to read file data during disc burning and image creation.
 
UdfFileProps UdfFileProps [get]
 Returns an object that provides access to UDF file and directory properties.
 

Detailed Description

The DataFile interface represents one file or directory from a data image.

Version
1.11
See also
DataDisc.SetImageLayout

Member Function Documentation

◆ Find() [1/2]

DataFile Find ( string  relativePath)

Finds a file in a file tree.

The returned object must be freed with the Dispose method.

Parameters
relativePathRelative path of the item. The path must start with "/". This method accepts only forward slashes (e.g. "/") for directory delimiter.
Version
3.0.8
Returns
  • A DataFile object that corresponds to the specified relative path.
  • null if an item with the specified relative path does not exists.
  • null if "/" is specified for relative relativePath.

References DataFile.Find().

Referenced by DataFile.Find(), and DataFile.Find().

◆ Find() [2/2]

DataFile Find ( string  relativePath,
bool  caseSensitive 
)

Finds a file in a file tree.

The returned object must be freed with the Dispose method.

Parameters
relativePathRelative path of the item. The path must start with "/". This method accepts only forward slashes (e.g. "/") for directory delimiter.
caseSensitiveIndicates the search should be case sensitive. The default value is "false".
Version
3.0.8
Returns
  • A DataFile object that corresponds to the specified relative path.
  • null if an item with the specified relative path does not exists.
  • null if "/" is specified for relative relativePath.

References DataFile.Children, DataFile.Find(), and DataFile.LongFilename.

Property Documentation

◆ Children

DataFileList Children
get

Gets the list of child DataFile objects associated with this file.

Version
2.20

Referenced by DataFile.Find().

◆ DataSource

DataSourceType DataSource
getset

Gets/sets the file data source.

The default value is DataSourceType.File.

Version
1.40
See also
PrimoSoftware.Burner.DataSourceType

DataSourceType

◆ DiscAddress

Int32 DiscAddress
getset

Gets the file relative logical block address.

When data source is set to DataSourceType.Disc this method returns the address at which the file starts on the disc. For ISO images this method returns the offset at which the file data starts in the image file. This method can be used together with DataFile.FileSize and Device.ReadData to read files from a disc or ISO image.

Version
1.50

◆ ExcludeMask

Int32 ExcludeMask
getset

Gets/sets a value indicating the file system from which the DataFile entry will be excluded.

This allows hybrid layouts to be built, in which some files are present in one file system and not present in another file system.

This property works for files and directories. When set for a directory the entire directory with all its children will be removed from the file system.

◆ FileSize

Int64 FileSize
getset

Gets/Sets the size of the file in bytes.

IMPORTANT: Single files cannot not be bigger than 4GB due to the file size limit of Joliet and ISO9660 images.

Version
1.40

◆ FileTime

DateTime FileTime
getset

Gets/Sets the file creation time.

This property returns and accepts local time.

Version
1.40

◆ HiddenMask

Int32 HiddenMask
getset

Gets/sets a value indicating for which file system is the hidden attribute set.

See also
PrimoSoftware.Burner.ImageType

◆ IsDirectory

bool IsDirectory
getset

Gets/sets a value indicating if this object is a directory.

The default value is false

◆ LongFilename

string LongFilename
getset

Gets/Sets the long filename.

The long filename determines how the file will appear in the image file structure. This name should not include any path information in it; only the filename and extension.

Long filename must be set in order to use the DataFile object by the other PrimoBurner classes (DataDisc, DiscArchive), otherwise an error may be raised (DataDiscError.EmptyFilename). The exception is when the image type is set to Iso9660 and the IsoLength8p3 image constraint is used - in that case the long filename may be omitted if the DataFile.ShortFilename property is set to a non-empty string.

See also
DataFile.ShortFilename

Referenced by DataFile.Find().

◆ Parent

DataFile Parent
getset

Gets the file parent.

  • Returns a reference to the parent DataFile object if such is defined.
  • Returns null when this object is the root of a file tree.
  • Returns null when this object is not part of a file tree.
Version
2.20

Referenced by DataFileList.Add(), and DataFileList.Remove().

◆ ShortFilename

string ShortFilename
getset

Gets/Sets the short filename.

The short filename determines how the file will appear in the data image structure when the image type is set to Iso9660 and the IsoLength8p3 image constraint is used. The short filename should follow the DOS 8.3 filename convention.

Version
1.50

◆ Stream

System.IO.Stream Stream
getset

Gets/sets a data stream that should be used to read file data during disc burning and image creation.

In order for this method to work the DataFile.DataSource property should be set to DataSourceType.Stream

◆ UdfFileProps

Returns an object that provides access to UDF file and directory properties.

Version
2.09

Referenced by DataFile.DataFile().