LSGetExtensionInfo(_:_:_:)
Obtains the starting index of the extension within a filename.
Declaration
func LSGetExtensionInfo(_ inNameLen: Int, _ inNameBuffer: UnsafePointer<UniChar>!, _ outExtStartIndex: UnsafeMutablePointer<Int>!) -> OSStatusParameters
- inNameLen:
The number of characters in the filename specified by the
inNameBufferparameter. - inNameBuffer:
The buffer containing the filename’s Unicode characters.
- outExtStartIndex:
A pointer to a value of type
UniCharCountthat, on return, will give the starting index of the extension within the filename. If the name does not contain a valid extension (one with no spaces in it), the value on return will bekLSInvalidExtensionIndex.
Return Value
A result code; see Result Codes.
Discussion
The starting index is the number of Unicode characters from the start of the filename buffer to the first character of the extension (not including the period).
Version-Notes
Thread-safe since Mac OS version 10.2.
See Also
Deprecated Functions
LSGetHandlerOptionsForContentType(_:)LSSetHandlerOptionsForContentType(_:_:)LSCopyAllHandlersForURLScheme(_:)LSCopyDefaultHandlerForURLScheme(_:)LSGetApplicationForItem(_:_:_:_:)LSGetApplicationForURL(_:_:_:_:)LSGetApplicationForInfo(_:_:_:_:_:_:)LSCopyApplicationForMIMEType(_:_:_:)LSCanRefAcceptItem(_:_:_:_:_:)LSFindApplicationForInfo(_:_:_:_:_:)LSOpenApplication(_:_:)LSOpenItemsWithRole(_:_:_:_:_:_:_:)LSOpenURLsWithRole(_:_:_:_:_:_:)LSOpenFSRef(_:_:)LSOpenFromRefSpec(_:_:)LSCopyItemInfoForRef(_:_:_:)LSCopyItemInfoForURL(_:_:_:)LSCopyDisplayNameForRef(_:_:)LSCopyDisplayNameForURL(_:_:)LSCopyKindStringForRef(_:_:)LSCopyKindStringForURL(_:_:)LSCopyKindStringForTypeInfo(_:_:_:_:)LSCopyKindStringForMIMEType(_:_:)LSCopyItemAttribute(_:_:_:_:)LSCopyItemAttributes(_:_:_:_:)LSSetExtensionHiddenForRef(_:_:)LSSetExtensionHiddenForURL(_:_:)LSRegisterFSRef(_:_:)