[This is preliminary documentation and is subject to change.]
The IOMiscUtils type exposes the following members.Methods
Name | Description | |
---|---|---|
![]() ![]() | AsCharEnumerable(Stream) | |
![]() ![]() | AsCharEnumerable(TextReader) | |
![]() ![]() | CopyStream |
Copies one stream into another using temp buffer
|
![]() ![]() | EnsureAccessibleDirectory |
Creates directory and immediately grants it accessibility rules for everyone if it does not exists,
or returns the existing directory
|
![]() ![]() | EnsureDirectoryDeleted |
Tries to delete the specified directory if it exists BLOCKING for up to the specified interval until directory is PHYSICALLY deleted.
Returns true when directory either did not exist in the first place or was successfully deleted (with confirmation).
Returns false when directory could not be confirmed to be deleted within the specified timeout, this does not mean
that the OS will not delete the directory later, so calling this function in a loop is expected.
NOTE: Directory.Delete() does not guarantee that directory is no longer on disk upon its return
|
![]() ![]() | EnsureFileEventuallyDeleted |
Deleted file if it exists - does not block until file is deleted, the behavior is up to the OS
|
![]() ![]() | GetURL |
Fetch the content of a given URL.
|
![]() ![]() | MemBufferEquals |
Returns true if both buffers contain the same number of the same bytes.
The implementation uses quad-word comparison as much as possible for speed.
Requires UNSAFE switch
|
![]() ![]() | NormalizeCenteredImage |
Scales source image so it fits in the desired image size preserving aspect ratio.
This function is usable for profile picture size/aspect normalization
|
![]() ![]() | PackISO3CodeToInt |
Represents an ISO code as 4 byte integer filled with
up to 3 ASCII chars converted to upper case, the highest byte is free to be used by the application
|
![]() ![]() | ReadBEInt32( Byte ) |
Reads an integer encoded as big endian from buffer at index 0
|
![]() ![]() | ReadBEInt32(Stream) |
Reads an integer encoded as big endian from buffer at the specified index
|
![]() ![]() | ReadBEInt32( Byte , Int32 ) |
Reads an integer encoded as big endian from buffer at the specified index
and increments the idx by the number of bytes read
|
![]() ![]() | ReadBEInt32( Byte , Int64 ) |
Reads an integer encoded as big endian from buffer at the specified index
and increments the idx by the number of bytes read
|
![]() ![]() | ReadBEShort(Stream) |
Reads a short encoded as big endian from stream
|
![]() ![]() | ReadBEShort( Byte , Int32 ) |
Reads a short encoded as big endian from buffer at the specified index
|
![]() ![]() | ReadBEUInt32( Byte ) |
Reads an unsigned integer encoded as big endian from buffer at index 0
|
![]() ![]() | ReadBEUInt32( Byte , Int32 ) |
Reads an unsigned integer encoded as big endian from buffer at the specified index
and increments the idx by the number of bytes read
|
![]() ![]() | ReadBEUInt32( Byte , Int64 ) |
Reads an unsigned integer encoded as big endian from buffer at the specified index
and increments the idx by the number of bytes read
|
![]() ![]() | ReadBEUInt64(Stream) |
Reads an integer encoded as big endian from buffer at the specified index
|
![]() ![]() | ReadBEUInt64( Byte , Int32) |
Reads an integer encoded as big endian from buffer at the specified index
and increments the idx by the number of bytes read
|
![]() ![]() | ReadBEUInt64( Byte , Int32 ) |
Reads an integer encoded as big endian from buffer at the specified index
and increments the idx by the number of bytes read
|
![]() ![]() | ReadBEUShort |
Reads an ushort encoded as big endian from stream
|
![]() ![]() | ReadLine |
Reads first line from the string
|
![]() ![]() | UnpackISO3CodeFromInt |
Unpacks an ISO code from int which was packed with PackISO3CodeToInt
|
![]() ![]() | WriteBEInt32( Byte , Int32) |
Writes an integer encoded as big endian to buffer at index 0
|
![]() ![]() | WriteBEInt32(Stream, Int32) |
Writes an integer encoded as big endian to the given stream
|
![]() ![]() | WriteBEInt32( Byte , Int32, Int32) |
Writes an integer encoded as big endian to buffer at the specified index
|
![]() ![]() | WriteBEShort(Stream, Int16) |
Writes a short encoded as big endian to the given stream
|
![]() ![]() | WriteBEShort( Byte , Int32, Int16) |
Writes a short encoded as big endian to buffer at the specified index
|
![]() ![]() | WriteBEUInt32( Byte , UInt32) |
Writes an unsigned integer encoded as big endian to buffer at index 0
|
![]() ![]() | WriteBEUInt32( Byte , Int32, UInt32) |
Writes an unsigned integer encoded as big endian to buffer at the specified index
|
![]() ![]() | WriteBEUInt64( Byte , UInt64) |
Writes an unsigned long integer encoded as big endian to buffer at the beginning
|
![]() ![]() | WriteBEUInt64(Stream, UInt64) |
Writes an unsigned long integer encoded as big endian to the given stream
|
![]() ![]() | WriteBEUInt64( Byte , Int32, UInt64) |
Writes an unsigned long integer encoded as big endian to buffer at the specified index
|
![]() ![]() | WriteBEUShort |
Writes an ushort encoded as big endian to the given stream
|
Fields
Name | Description | |
---|---|---|
![]() ![]() | IO_WAIT_DEFAULT_TIMEOUT | |
![]() ![]() | IO_WAIT_GRANULARITY_MS | |
![]() ![]() | IO_WAIT_MIN_TIMEOUT |
See Also