Urho.IO.File Class

File opened either through the filesystem or from within a package file.

See Also: File

Syntax

public class File : UrhoObject, IDeserializer, ISerializer

Requirements

Namespace: Urho.IO
Assembly: Urho (in Urho.dll)
Assembly Versions: 1.0.0.0

The members of Urho.IO.File are listed below.

See Also: UrhoObject

Public Constructors

Constructs a new instance of Urho.IO.File which is tied to the Application.CurrentContext.
Constructs a new instance of Urho.IO.File, given a raw pointer to an unmanaged object
Constructs a new instance of Urho.IO.File linked to a specific Context.
Creates an instance of File that is attached to an execution context.
Creates an instance of File that is attached to an execution context.

Protected Constructors

Empty constructor, chain to this constructor when you provide your own constructor that sets the handle field.

Public Properties

[read-only]
ChecksumUInt32. Return a checksum of the file contents using the SDBM hash algorithm.
[read-only]
FileHandleIntPtr. Return the file handle.
[read-only]
ModeFileMode. Return the open mode.
NameString. Return the file name. Or Change the file name. Used by the resource system.
[read-only]
PackagedBoolean. Return whether the file originates from a package (false if it originates from a host file system file)
[read-only]
override
TypeStringHash. Urho's type system type.
[read-only]
override
TypeNameString. Urho's low-level type name.
[read-only]
static
TypeNameStaticString. Urho's low-level type name, accessible as a static method.
[read-only]
static
TypeStaticStringHash. Urho's low-level type, accessible as a static method.

Public Methods

Close()
Close the file.
Flush()
Flush any buffered output to the file.
IsOpen() : Boolean
Return whether is open.
Open(String, FileMode) : Boolean
Open a filesystem file. Return true if successful.
Open(PackageFile, String) : Boolean
Open from within a package file. Return true if successful.
Read(IntPtr, UInt32) : UInt32
Read bytes from the file. Return number of bytes actually read.
Seek(UInt32) : UInt32
Set position from the beginning of the file.
Write(Void*, UInt32) : UInt32
Write bytes to the file. Return number of bytes actually written.