Interprets the receiver as a path in the file system and attempts to perform filename completion, returning a numeric value that indicates whether a match was possible, and by reference the longest path that matches the receiver.
- iOS 2.0+
- macOS 10.0+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
Upon return, contains the longest path that matches the receiver.
YES, the method considers case for possible completions.
Upon return, contains all matching filenames.
An array of
NSStringobjects specifying path extensions to consider for completion. Only paths whose extensions (not including the extension separator) match one of these strings are included in
nilif you don’t want to filter the output.
0 if no matches are found and
1 if exactly one match is found. In the case of multiple matches, returns the actual number of matching paths if
output is provided, or simply a positive value if
You can check for the existence of matches without retrieving by passing
Note that this method only works with file paths (not, for example, string representations of URLs).