macOS/iOS API解説

iOS , Mac アプリケーション開発のために使われる主要フレームワークの日本語情報です。2010年代に書かれた内容です。今後更新はありません。

目次

fileHandleForWritingAtPath:

Index>Foundation>NSFileHandle

指定したパスで書き込みできるファイルハンドルを作って初期化して返します
+(id)fileHandleForWritingAtPath:(NSString *)path:

解説

指定したファイル、デバイス、名前付きのソケットのパスを使って、書き込みできるファイルハンドルを作って初期化して返します。
NSFileHandleのwriteData:メソッドにしか反応しません。

返り値

( id )

ファイルハンドル

引数

( NSString * )path

ファイルパス

クラス

NSFileHandle

Class Methods

使用可能

10.0

参照

+ fileHandleWithNullDevice
- initWithFileDescriptor:

例文

handle2 = [NSFileHandle fileHandleForWritingAtPath:[str1 stringByExpandingTildeInPath]];