Mac Developer Library

Developer

DRContentFolder.h Reference

Options
Deployment Target:

On This Page
Language:

DRContentFolder.h Reference

Interface to folder objects used in filesystem creation.

Included Headers

  • <DiscRecording/DRContentObject.h>

  • <CoreFoundation/CFURL.h>

  • <AvailabilityMacros.h>

Functions

  • Adds a file or folder object reference as a child of a virtual folder object.

    This function applies only to virtual folders. Real folders are considered "leaf nodes" and cannot have children.

    Declaration

    Swift

    func DRFolderAddChild(_ parent: DRFolder!, _ newChild: DRFSObject!)

    Objective-C

    void DRFolderAddChild ( DRFolderRef parent, DRFSObjectRef newChild );

    Parameters

    parent

    A reference to the folder that will be the new parent.

    newChild

    A reference to the file or folder object that will be the new child.

    Import Statement

    Objective-C

    @import DiscRecording;

    Swift

    import DiscRecording

    Availability

    Available in OS X v10.2 and later.

  • Converts a real folder to a virtual folder. Conversion happens in-place so there is no need to release or reallocate any objects.

    Declaration

    Swift

    func DRFolderConvertRealToVirtual(_ realFolder: DRFolder!)

    Objective-C

    void DRFolderConvertRealToVirtual ( DRFolderRef realFolder );

    Parameters

    realFolder

    A reference to the folder object to convert. The caller should pass in a reference to a real folder. On success it will have been converted to a virtual folder.

    Discussion

    The virtual folder created in this way is a snapshot of the on-disk folder at the moment of the call. The newly-created virtual folder will contain real folder and file objects corresponding to the on-disk children of the original on-disk folder.

    If the on-disk folder attributes change, or if children are added to or removed from the on-disk tree during this call, the virtual folder may or may not reflect the changes. It the on-disk attributes change after this call, the virtual folder will not reflect the changes.

    Import Statement

    Objective-C

    @import DiscRecording;

    Swift

    import DiscRecording

    Availability

    Available in OS X v10.2 and later.

  • Obtains an array containing the children of a virtual folder.

    Declaration

    Swift

    func DRFolderCopyChildren(_ folder: DRFolder!) -> Unmanaged<CFArray>!

    Objective-C

    CFArrayRef DRFolderCopyChildren ( const DRFolderRef folder );

    Parameters

    folder

    The folder reference to query.

    Return Value

    Returns a CFArray object containing the virtual folder's children.

    Discussion

    The order of the children in the array is arbitrary; the various files systems being generated for a burn may have different sorting requirements, so there is no one definitive sort order. The ordering will change only when children are added or removed.

    Your application should sort the children consistently and according to the needs of your user interface.

    This function applies only to virtual folders. Real folders are considered "leaf nodes" and should not be passed to this call.

    Import Statement

    Objective-C

    @import DiscRecording;

    Swift

    import DiscRecording

    Availability

    Available in OS X v10.2 and later.

  • Obtains the number of children of a virtual folder.

    Declaration

    Swift

    func DRFolderCountChildren(_ folder: DRFolder!) -> UInt32

    Objective-C

    UInt32 DRFolderCountChildren ( const DRFolderRef folder );

    Parameters

    folder

    The folder reference to query.

    Return Value

    Returns the number of children.

    Discussion

    This function applies only to virtual folders. Real folders are considered "leaf nodes" and should not be passed to this call.

    Import Statement

    Objective-C

    @import DiscRecording;

    Swift

    import DiscRecording

    Availability

    Available in OS X v10.2 and later.

  • Creates a new real folder object corresponding to a given FSRef object.

    Declaration

    Swift

    func DRFolderCreateReal(_ fsRef: UnsafePointer<FSRef>) -> Unmanaged<DRFolder>!

    Objective-C

    DRFolderRef DRFolderCreateReal ( const FSRef *fsRef );

    Parameters

    fsRef

    A file-system reference to an on-disk folder.

    Return Value

    Returns a reference to the newly-created folder object, or NULL.

    Discussion

    A real folder object is a folder object corresponding to a real folder on disk. The content of the folder object corresponds to the actual on-disk content of the folder. Items cannot be programatically added to or removed from a real folder object without making it virtual first -- see DRFolderConvertRealToVirtual .

    Import Statement

    Objective-C

    @import DiscRecording;

    Swift

    import DiscRecording

    Availability

    Available in OS X v10.2 and later.

  • Creates a new real folder object corresponding to a given file URL.

    Declaration

    Swift

    func DRFolderCreateRealWithURL(_ urlRef: CFURL!) -> Unmanaged<DRFolder>!

    Objective-C

    DRFolderRef DRFolderCreateRealWithURL ( const CFURLRef urlRef );

    Parameters

    urlRef

    A URL reference to an on-disk folder.

    Return Value

    Returns a reference to the newly-created folder object, or NULL.

    Discussion

    A real folder object is a folder object corresponding to a real folder on disk. The contents of the folder object corresponds to the actual on-disk contents of the folder. Items cannot be programatically added to or removed from a real folder object without making it virtual first -- see DRFolderConvertRealToVirtual .

    Import Statement

    Objective-C

    @import DiscRecording;

    Swift

    import DiscRecording

    Availability

    Available in OS X v10.2 and later.

  • Creates a new, empty virtual folder object.

    Declaration

    Swift

    func DRFolderCreateVirtual(_ baseName: CFString!) -> Unmanaged<DRFolder>!

    Objective-C

    DRFolderRef DRFolderCreateVirtual ( CFStringRef baseName );

    Parameters

    baseName

    The base name to assign to the new virtual folder. For information on base names and how Disc Recording works with them, see DRFSObjectSetBaseName and DRFSObjectSetSpecificName .

    Return Value

    Returns a reference to the newly-created virtual folder object, or NULL.

    Discussion

    A virtual folder object is a folder object which does not correspond to any real folder on disk, but represents a folder you want to appear in the file structure of the disc you are burning. It is created and modified using Disc Recording's 'content' functions -- see the documentation for DRContentObject.h.

    Import Statement

    Objective-C

    @import DiscRecording;

    Swift

    import DiscRecording

    Availability

    Available in OS X v10.2 and later.

  • Returns the type identifier of all DRFolder instances.

    Declaration

    Swift

    func DRFolderGetTypeID() -> CFTypeID

    Objective-C

    CFTypeID DRFolderGetTypeID ( void );

    Import Statement

    Objective-C

    @import DiscRecording;

    Swift

    import DiscRecording

    Availability

    Available in OS X v10.2 and later.

  • Removes a file or folder object reference so a file or folder is no longer a child of the specified folder object.

    This function applies only to virtual folders. Real folders are considered "leaf nodes" and cannot have children.

    Declaration

    Swift

    func DRFolderRemoveChild(_ parent: DRFolder!, _ child: DRFSObject!)

    Objective-C

    void DRFolderRemoveChild ( DRFolderRef parent, DRFSObjectRef child );

    Parameters

    parent

    A reference to the folder that will no longer be the parent of the child object.

    child

    A reference to the file or folder object that will no longer be a child of the parent object.

    Import Statement

    Objective-C

    @import DiscRecording;

    Swift

    import DiscRecording

    Availability

    Available in OS X v10.2 and later.