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

getOffset:error:

Get the current position of the file pointer within the file.

Declaration 宣言

- (BOOL)getOffset:(out unsigned long long *)offsetInFile 
            error:(out NSError * _Nullable *)error;

Parameters パラメータ

offsetInFile

When the return value is YES, this provides the current position of the file pointer within the file.

error

When the return value is NO, this provides an NSError indicating why the operation failed.

Return Value 戻り値

Returns NO when there was an error. Otherwise, returns YES and sets the offsetInFile parameter’s pointee to the current position of the file pointer within the file.

Discussion 議論

Returns NO if called on a file handle representing a pipe or socket, or if the file descriptor is closed.

See Also 参照

Seeking Within a File ファイルの内部をシークする