Platforms to show: All Mac Windows Linux Cross-Platform

NSFileHandleMBS class

Type Topic Plugin Version macOS Windows Linux iOS Targets
class Cocoa Tasks MBS MacCocoa Plugin 9.7 ✅ Yes ❌ No ❌ No ✅ Yes All
NSFileHandle objects provide an object-oriented wrapper for accessing open files or communications channels.
Example
// 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.

This class has no sub classes.

Some methods using this class:

Some properties using for this class:

Some examples using this class:

Blog Entries


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


NSFileCoordinatorMBS   -   NSFileManagerMBS


The biggest plugin in space...