Mac Developer Library

Developer

DRFSObject Class Reference

Options
Deployment Target:

On This Page
Language:

DRFSObject

Abstract base class for the content creation framework More...

Inheritance


Conforms To


Import Statement


import DiscRecording @import DiscRecording;

Availability


Available in OS X v10.2 and later.
  • Returns the base name for the receiver.

    Declaration

    Swift

    func baseName() -> String!

    Objective-C

    - (NSString *)baseName

    Return Value

    The base name of the object.

    Discussion

    The base name is the name from which any necessary filesystem-specific names are automatically generated.

    Because the content creation API is able to generate multiple filesystems which require multiple varied naming conventions, a sensible system for naming is required. Thus each file has a base name which corresponds to its default name in any filesystem.

    Whenever possible, the base name will be used in the generated filesystem without modification. If the name cannot be used as-is (if, for example, it contains illegal characters, exceeds the length requirements, doesn't meet the required format, or a name collision is detected) then an acceptable name that meets the filesystem's criteria will be generated automatically from the base name.

    The default base name for a real file or folder is the actual on-disk name of the item.

    Import Statement

    import DiscRecording

    Availability

    Available in OS X v10.2 and later.

  • Returns the effective filesystem mask set for the reciever.

    Declaration

    Swift

    func effectiveFilesystemMask() -> DRFilesystemInclusionMask

    Objective-C

    - (DRFilesystemInclusionMask)effectiveFilesystemMask

    Return Value

    A filesystem mask

    Discussion

    The parent filesystem mask is taken into account for the receiver.

    Import Statement

    import DiscRecording

    Availability

    Available in OS X v10.2 and later.

  • Returns the explicit filesystem mask set for the reciever.

    Declaration

    Swift

    func explicitFilesystemMask() -> DRFilesystemInclusionMask

    Objective-C

    - (DRFilesystemInclusionMask)explicitFilesystemMask

    Return Value

    A filesystem mask

    Discussion

    The explicit mask is one that has been explicitly set by a client through the setExplicitFilesystemMask: method.

    Import Statement

    import DiscRecording

    Availability

    Available in OS X v10.2 and later.

  • Indicates whether the receiver is real or virtual.

    Declaration

    Swift

    func isVirtual() -> Bool

    Objective-C

    - (BOOL)isVirtual

    Return Value

    YES if the receiver is virtual and NO if real.

    Import Statement

    import DiscRecording

    Availability

    Available in OS X v10.2 and later.

  • Returns a single filesystem-specific name for the receiver, mangled for uniqueness.

    Declaration

    Swift

    func mangledNameForFilesystem(_ filesystem: String!) -> String!

    Objective-C

    - (NSString *)mangledNameForFilesystem:(NSString *)filesystem

    Parameters

    filesystem

    The filesystem to set the name for.

    Return Value

    The name of the file mangled for filesystem constraints.

    Discussion

    The string will be mangled for uniqueness amongst its siblings; if the burn were to happen immediately after this call, this is the name which would be used on the resulting disc.

    Import Statement

    import DiscRecording

    Availability

    Available in OS X v10.2 and later.

  • Returns a dictionary containing all of the filesystem-specific names for the receiver, each one mangled for uniqueness.

    Declaration

    Swift

    func mangledNames() -> [NSObject : AnyObject]!

    Objective-C

    - (NSDictionary *)mangledNames

    Return Value

    An NSDictionary containing the filesystem-specific mangled file names.

    Discussion

    The dictionary will return only the names which are indicated by the receiver's effective mask. If the receiver's effective mask is zero, an empty dictionary is returned.

    Import Statement

    import DiscRecording

    Availability

    Available in OS X v10.2 and later.

  • Returns the parent folder (if any) of the receiver in the content hierarchy.

    Declaration

    Swift

    func parent() -> DRFolder!

    Objective-C

    - (DRFolder *)parent

    Return Value

    A DRFolder in DRFolder Class Reference object.

    Import Statement

    import DiscRecording

    Availability

    Available in OS X v10.2 and later.

  • Returns all the filesystem properties set for the specified filesystem.

    Declaration

    Swift

    func propertiesForFilesystem(_ filesystem: String!, mergeWithOtherFilesystems merge: Bool) -> [NSObject : AnyObject]!

    Objective-C

    - (NSDictionary *)propertiesForFilesystem:(NSString *)filesystem mergeWithOtherFilesystems:(BOOL)merge

    Parameters

    filesystem

    The filesystem to look in.

    merge

    If YES, also look for properties in the umbrella DRAllFilesystems in DRFSObject.h Reference .

    Return Value

    A dictionary of property values.

    Discussion

    Normally you would call this method with merge set to YES since you are interested in the set of properties that will be used when writing the object to disc. But if you have a need to determine what properties are set just for a specific filesystem, then pass in NO for merge. In this case only the specific filesystem is checked. So if filesystem is set to DRHFSPlus in DRFSObject.h Reference and merge is NO then the properties dictionary contains the values set for the HFS+ filesytem only. If no properties have been directly set for HFS+ yet, then this properties dictionary will be empty.

    Import Statement

    import DiscRecording

    Availability

    Available in OS X v10.2 and later.

  • Returns a file/folder property specified by key for the specified filesystem.

    Declaration

    Swift

    func propertyForKey(_ key: String!, inFilesystem filesystem: String!, mergeWithOtherFilesystems merge: Bool) -> AnyObject!

    Objective-C

    - (id)propertyForKey:(NSString *)key inFilesystem:(NSString *)filesystem mergeWithOtherFilesystems:(BOOL)merge

    Parameters

    key

    The property to return.

    filesystem

    The filesystem to look in.

    merge

    If YES, also look for the property in the umbrella DRAllFilesystems in DRFSObject.h Reference .

    Return Value

    The value associated with the property.

    Discussion

    Normally you would call this method with merge set to YES since you are interested in the property that will be used when writing the object to disc. But if you have a need to determine what property is set just for a specific filesystem, then pass in NO for merge. In this case only the specific filesystem is checked. So if DRHFSPlus in DRFSObject.h Reference is passed in for filesystem and merge is NO then the property returned is the value set for the HFS+ filesytem only. If that property has not been directly set for HFS+ yet, then the returned value will be nil.

    Import Statement

    import DiscRecording

    Availability

    Available in OS X v10.2 and later.

  • Sets the base name for the receiver.

    Declaration

    Swift

    func setBaseName(_ baseName: String!)

    Objective-C

    - (void)setBaseName:(NSString *)baseName

    Parameters

    baseName

    The new base name of the object.

    Discussion

    The base name is the name from which any necessary filesystem-specific names are automatically generated.

    Because the content creation API is able to generate multiple filesystems which require multiple varied naming conventions, a sensible system for naming is required. Thus each file has a base name which corresponds to its default name in any filesystem.

    Whenever possible, the base name will be used in the generated filesystem without modification. If the name cannot be used as-is (if, for example, it contains illegal characters, exceeds the length requirements, doesn't meet the required format, or a name collision is detected) then an acceptable name that meets the filesystem's criteria will be generated automatically from the base name.

    The default base name for a real file or folder is the actual on-disk name of the item.

    Import Statement

    import DiscRecording

    Availability

    Available in OS X v10.2 and later.

  • Sets the filesystems the receiver will be included on.

    Declaration

    Swift

    func setExplicitFilesystemMask(_ mask: DRFilesystemInclusionMask)

    Objective-C

    - (void)setExplicitFilesystemMask:(DRFilesystemInclusionMask)mask

    Parameters

    mask

    A filesystem mask

    Discussion

    The effective mask for an item cannot be more inclusive than the effective mask of it's parent. If the mask set for a child is more inclusive than its parent's mask, those filesystems not allowed by the parent will be stripped from the resulting effective mask of the child.

    Import Statement

    import DiscRecording

    Availability

    Available in OS X v10.2 and later.

  • Sets the value of all the receiver's properties specified by the keys in properties for the specific filesystem.

    Declaration

    Swift

    func setProperties(_ properties: [NSObject : AnyObject]!, inFilesystem filesystem: String!)

    Objective-C

    - (void)setProperties:(NSDictionary *)properties inFilesystem:(NSString *)filesystem

    Parameters

    properties

    The value of the property.

    filesystem

    The filesystem to set the property in.

    Discussion

    The properties are set only in the filesystem dictionary specified by filesystem. DRAllFilesystems in DRFSObject.h Reference may be specified as the filesystem in which case he umbrella property affecting all filesystems at once will be set. Setting properties for DRAllFilesystems in DRFSObject.h Reference does not preclude setting a filesystem specific property.

    Import Statement

    import DiscRecording

    Availability

    Available in OS X v10.2 and later.

  • Sets the value of the receiver's property specified by key for the specific filesystem.

    Declaration

    Swift

    func setProperty(_ property: AnyObject!, forKey key: String!, inFilesystem filesystem: String!)

    Objective-C

    - (void)setProperty:(id)property forKey:(NSString *)key inFilesystem:(NSString *)filesystem

    Parameters

    property

    The value of the property.

    key

    The property key.

    filesystem

    The filesystem to set the property in.

    Discussion

    The property is set only in the filesystem dictionary specified by filesystem. DRAllFilesystems in DRFSObject.h Reference may be specified as the filesystem in which case the umbrella property affecting all filesystems at once will be set. Setting a property for DRAllFilesystems in DRFSObject.h Reference does not preclude setting a filesystem specific property.

    Import Statement

    import DiscRecording

    Availability

    Available in OS X v10.2 and later.

  • Sets the name used for the receiver in a particular filesystem.

    Declaration

    Swift

    func setSpecificName(_ name: String!, forFilesystem filesystem: String!)

    Objective-C

    - (void)setSpecificName:(NSString *)name forFilesystem:(NSString *)filesystem

    Parameters

    name

    The name to set.

    filesystem

    The filesystem to set the name for.

    Discussion

    Every effort will be made to use the name passed in. However, if a name is illegal, it will be modified to fit the rules for the filesystem's names. Because of this, you should always call specificNameForFilesystem: after to ensure that you are always displaying the most current names to the user.

    Import Statement

    import DiscRecording

    Availability

    Available in OS X v10.2 and later.

  • Sets the names used for the receiver in the different filesystems all at once.

    Declaration

    Swift

    func setSpecificNames(_ specificNames: [NSObject : AnyObject]!)

    Objective-C

    - (void)setSpecificNames:(NSDictionary *)specificNames

    Parameters

    specificNames

    The names to set.

    Discussion

    Takes an NSDictionary of filesystem keys with corresponding name strings as their values for each specific filesystem name that should be set.

    Every effort will be made to use the names passed in. However, if a name is illegal, it will be modified to fit the rules for that filesystem's names. Because of this, you should always call specificNames after setSpecificNames: to ensure that you are always displaying the most current names to the user.

    Import Statement

    import DiscRecording

    Availability

    Available in OS X v10.2 and later.

  • Returns the path to a real object.

    Declaration

    Swift

    func sourcePath() -> String!

    Objective-C

    - (NSString *)sourcePath

    Return Value

    A path

    Discussion

    This method only applies to DRFSObjects pointing to real objects.

    Import Statement

    import DiscRecording

    Availability

    Available in OS X v10.2 and later.

  • Returns a single filesystem-specific name for the receiver.

    Declaration

    Swift

    func specificNameForFilesystem(_ filesystem: String!) -> String!

    Objective-C

    - (NSString *)specificNameForFilesystem:(NSString *)filesystem

    Parameters

    filesystem

    The filesystem to return the name from.

    Return Value

    An NSString containing the name of the file.

    Import Statement

    import DiscRecording

    Availability

    Available in OS X v10.2 and later.

  • Returns all the filesystem-specific names for the receiver.

    Declaration

    Swift

    func specificNames() -> [NSObject : AnyObject]!

    Objective-C

    - (NSDictionary *)specificNames

    Parameters

    filesystem

    The filesystem to return the name from.

    Return Value

    An NSDictionary containing the name of the file on all the filesystems.

    Import Statement

    import DiscRecording

    Availability

    Available in OS X v10.2 and later.