Instance Method インスタンスメソッド

completePathIntoString:caseSensitive:matchesIntoArray:filterTypes:

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. レシーバをファイルシステムでのあるパスとして解釈します、そしてファイル名補完を実行しようと試みます、合致が可能であるかどうかを指し示すある数値を、そしてレシーバと合致する最も長いパスを参照によって返します。

Declaration 宣言

- (NSUInteger)completePathIntoString:(NSString * _Nullable *)outputName 
                       caseSensitive:(BOOL)flag 
                    matchesIntoArray:(NSArray<NSString *> * _Nullable *)outputArray 
                         filterTypes:(NSArray<NSString *> *)filterTypes;

Parameters パラメータ

outputName

Upon return, contains the longest path that matches the receiver. 戻りでは、レシーバと合致する最も長いパスを含みます。

flag

If YES, the method considers case for possible completions. YESならば、メソッドは可能な補完に対してケースを考慮します。

outputArray

Upon return, contains all matching filenames. 戻りでは、すべての合致するファイル名を含みます。

filterTypes

An array of NSString objects specifying path extensions to consider for completion. Only paths whose extensions (not including the extension separator) match one of these strings are included in outputArray. Pass nil if you don’t want to filter the output. 補完に対して考慮するパス拡張子を指定しているNSStringオブジェクトからなる配列。その拡張子(拡張子の分離子を含まない)がこれらの文字列の1つに合致するパスのみがoutputArrayに含まれます。nilを渡してください、もしあなたが出力をフィルタすることを望まないならば。

Return Value 戻り値

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 outputArray is provided, or simply a positive value if outputArray is NULL. 合致するものが見つけられないならば0そしてぴったり1つの合致が見つけられるならば1。複数の合致の場合には、outputArrayが提供されるならば合致するパスの実際の数を、またはoutputArrayNULLの場合には単にある可能な値を返します。

Discussion 議論

You can check for the existence of matches without retrieving by passing NULL as outputArray. あなたは合致の存在について、NULLoutputArrayとして渡すことで取ってくることなしに確認できます。

Note that this method only works with file paths (not, for example, string representations of URLs). このメソッドはファイルパスでのみ働くことに注意してください(例えば、URLの文字列表現ではなく)。

See Also 参照

Working with Paths パスを扱う