keyForChildFileWrapper(_:)
Returns the dictionary key used by a directory to identify a given file wrapper.
Declaration
func keyForChildFileWrapper(_ child: FileWrapper) -> String?Parameters
- child:
The child file wrapper for which you want the key.
Return Value
Dictionary key used to store the file wrapper in the directory’s list of file wrappers. The dictionary key is a unique filename, which may not be the same as the passed-in file wrapper’s preferred filename if more than one file wrapper in the directory’s dictionary of children has the same preferred filename. See Accessing File Wrapper Identities in File System Programming Guide for more information about the file-wrapper list structure. Returns nil if the file wrapper specified in child is not a child of the directory.
Discussion
This method raises NSInternalInconsistencyException if the receiver is not a directory file wrapper.