ADC Home > Reference Library > Reference > Audio > Carbon > Disc Recording Framework Reference

 


DRFolder(VirtualFolders)

Extends Class:
Declared In:

Overview

This category on DRFolder defines methods that allow creation and manipulation of folders on the output disc that do not exist on the source media.



Methods

-addChild:
Adds an object reference (either a file or folder) as a child of a virtual folder object.
-children
Returns an array containing the children of a virtual folder.
-count
Returns the number of children of a virtual folder.
-initWithName:
Initializes a virtual file object
-makeVirtual
Changes the real DRFolder object into a virtual DRFolder object.
-removeChild:
Removes an object reference (either a file or folder) as a child of a virtual folder object.
+virtualFolderWithName:
Creates a virtual folder object

addChild:


Adds an object reference (either a file or folder) as a child of a virtual folder object.

- (void) addChild:(DRFSObject*)child; 
Parameters
child
The child to add to the folder
Discussion

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


children


Returns an array containing the children of a virtual folder.

- (NSArray*) children; 
Return Value

An NSArray of DRFile and DRFolder objects.

Discussion

The order of children in the array is arbitrary -- since the various filesystems being generated may have different sorting requirements, there is no one true way to sort the children. The ordering will change only when children are added or removed. You should sort the children according to the needs of your display, and in a consistent manner.

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


count


Returns the number of children of a virtual folder.

- (NSUInteger) count; 
Return Value

A count of the number of children.

Discussion

This method returns a shallow count of only those children that are immediately contained within the virtual folder.

This method only applies to virtual folders. Real folders are considered leaf nodes and should not be messaged with this call.


initWithName:


Initializes a virtual file object

- (id) initWithName:(NSString*)name; 
Parameters
name
The name of the folder on the output disc.
Return Value

A DRFolder object.

Discussion

Initializes a DRFolder object that will be populated with specified DRFile and DRFolder objects at runtime.


makeVirtual


Changes the real DRFolder object into a virtual DRFolder object.

- (void) makeVirtual; 
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 is modified (eg, if the 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. If modified after this call, the virtual folder will not reflect the changes.


removeChild:


Removes an object reference (either a file or folder) as a child of a virtual folder object.

- (void) removeChild:(DRFSObject*)child; 
Parameters
child
The child to remove from the folder
Discussion

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


virtualFolderWithName:


Creates a virtual folder object

+ (DRFolder*) virtualFolderWithName:(NSString*)name; 
Parameters
name
The name of the folder on the output disc.
Return Value

An autoreleased DRFolder object.

Discussion

Creates and initializes a DRFolder object that will be populated with specified DRFile and DRFolder objects at runtime.


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.
Last Updated: 2008-04-01