Xojo Conferences

Platforms to show: All Mac Windows Linux Cross-Platform

NSFileHandleMBS class

Type Topic Plugin Version macOS Windows Linux Console & Web iOS
class Cocoa Tasks MBS MacCocoa Plugin 9.7 Yes No No Yes, macOS only No
Function: NSFileHandle objects provide an object-oriented wrapper for accessing open files or communications channels.
// file must exist for this sample:

dim f as FolderItem = SpecialFolder.Desktop.Child("test.txt")
dim n as NSFileHandleMBS = NSFileHandleMBS.fileHandleForReadingAtFile(f)

if n<>Nil then
MsgBox n.readDataToEndOfFile
end if
Please call closeFile on the end if you want to close the file.
This is an abstract class. You can't create an instance, but you can get one from various plugin functions.

Feedback, Comments & Corrections

This class has no sub classes.

Some methods using this class:

Some properties using for this class:

Some examples which use this class:

Blog Entries

The items on this page are in the following plugins: MBS MacCocoa Plugin.

NSFileCoordinatorMBS   -   NSFileManagerMBS

The biggest plugin in space...

MBS Xojo Plugins