1 <Type Name="UnixMarshal" FullName="Mono.Unix.UnixMarshal">
2 <TypeSignature Language="C#" Value="public sealed class UnixMarshal" />
4 <AssemblyName>Mono.Posix</AssemblyName>
5 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
6 <AssemblyVersion>2.0.0.0</AssemblyVersion>
8 <ThreadingSafetyStatement>This type is safe for multithreaded operations.</ThreadingSafetyStatement>
10 <BaseTypeName>System.Object</BaseTypeName>
15 Provides a collection of miscellaneous methods for marshaling strings,
16 allocating memory, and interoperating with the operating system.
20 The <b>UnixMarshal</b> class consists of many members to facilitate
21 the <see cref="T:System.Runtime.InteropServices.Marshal" /> class,
22 specifically for use with Unix.
25 The following table assigns each method to a category that describes
31 <description>Members</description>
34 <term>Data Transformation</term>
38 <see cref="M:Mono.Unix.UnixMarshal.StringToHeap" />,
42 <see cref="M:Mono.Unix.UnixMarshal.PtrToString" />,
43 <see cref="M:Mono.Unix.UnixMarshal.PtrToStringArray" />,
44 <see cref="M:Mono.Unix.UnixMarshal.PtrToStringUnix" /></para>
48 <term>Error Handling</term>
50 <see cref="M:Mono.Unix.UnixMarshal.GetErrorDescription" />,
51 <see cref="M:Mono.Unix.UnixMarshal.ShouldRetrySyscall" />,
52 <see cref="M:Mono.Unix.UnixMarshal.ThrowExceptionForError" />,
53 <see cref="M:Mono.Unix.UnixMarshal.ThrowExceptionForErrorIf" />,
54 <see cref="M:Mono.Unix.UnixMarshal.ThrowExceptionForLastError" />,
55 <see cref="M:Mono.Unix.UnixMarshal.ThrowExceptionForLastErrorIf" /></description>
58 <term>Memory Management</term>
60 <see cref="M:Mono.Unix.UnixMarshal.AllocHeap" />,
61 <see cref="M:Mono.Unix.UnixMarshal.ReAllocHeap" />,
62 <see cref="M:Mono.Unix.UnixMarshal.FreeHeap" /></description>
68 <Member MemberName="AllocHeap">
69 <MemberSignature Language="C#" Value="public static IntPtr AllocHeap (long size);" />
70 <MemberType>Method</MemberType>
72 <ReturnType>System.IntPtr</ReturnType>
75 <Parameter Name="size" Type="System.Int64" />
79 A <see cref="T:System.Int64" /> containing the number of bytes to
80 allocate on the system heap.
82 <summary>Allocates <paramref name="size" /> bytes from the system heap.</summary>
84 A <see cref="T:System.IntPtr" /> containing the address of
85 <paramref name="size" /> bytes on the system heap, or
86 <see cref="F:System.IntPtr.Zero" /> if the memory could not be
91 The "system heap" is where dynamic memory is allocated by the
92 runtime C library, <c>MSVCRT.DLL</c> on Win32 and <c>libc</c> on
96 The memory allocated by this function must be freed via
97 <see cref="M:Mono.Unix.UnixMarshal.FreeHeap" /> to avoid a memory
101 <exception cref="T:System.ArgumentOutOfRangeException">
102 <paramref name="size" /> is a negative value.
104 <altmember cref="M:Mono.Unix.UnixMarshal.FreeHeap" />
105 <altmember cref="M:Mono.Unix.Native.Stdlib.malloc" />
108 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
109 <AssemblyVersion>2.0.0.0</AssemblyVersion>
112 <Member MemberName="FreeHeap">
113 <MemberSignature Language="C#" Value="public static void FreeHeap (IntPtr ptr);" />
114 <MemberType>Method</MemberType>
116 <ReturnType>System.Void</ReturnType>
119 <Parameter Name="ptr" Type="System.IntPtr" />
123 A <see cref="T:System.IntPtr" /> containing the address of a block
124 of memory previously returned by
125 <see cref="M:Mono.Unix.UnixMarshal.AllocHeap" /> or
126 <see cref="M:Mono.Unix.UnixMarshal.ReAllocHeap" />.
128 <summary>Frees the memory referenced by <paramref name="ptr" />.</summary>
131 If <paramref name="ptr" /> is <see cref="F:System.IntPtr.Zero" />,
135 The "system heap" is where dynamic memory is allocated by the
136 runtime C library, <c>MSVCRT.DLL</c> on Win32 and <c>libc</c> on
140 <altmember cref="M:Mono.Unix.UnixMarshal.AllocHeap" />
141 <altmember cref="M:Mono.Unix.UnixMarshal.ReAllocHeap" />
142 <altmember cref="M:Mono.Unix.Native.Stdlib.free" />
145 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
146 <AssemblyVersion>2.0.0.0</AssemblyVersion>
149 <Member MemberName="GetErrorDescription">
150 <MemberSignature Language="C#" Value="public static string GetErrorDescription (Mono.Unix.Native.Errno errno);" />
151 <MemberType>Method</MemberType>
153 <ReturnType>System.String</ReturnType>
156 <Parameter Name="errno" Type="Mono.Unix.Native.Errno" />
160 A <see cref="T:Mono.Unix.Native.Errno" /> containing the error code
161 to get the description for.
163 <summary>Gets a description for the error code <paramref name="errno" />.</summary>
165 A <see cref="T:System.String" /> containing a description of the
166 specified error code <paramref name="errno" />.
170 If <paramref name="errno" /> isn't a valid error number or isn't
171 supported by the operating system, then the string
172 "<c>** Unknown error code: <paramref name="errno" />**</c>" is
176 <altmember cref="M:Mono.Unix.Native.Stdlib.strerror" />
177 <altmember cref="M:Mono.Unix.Native.Syscall.strerror_r" />
180 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
181 <AssemblyVersion>2.0.0.0</AssemblyVersion>
185 <AttributeName>System.CLSCompliant(false)</AttributeName>
189 <Member MemberName="PtrToString">
190 <MemberSignature Language="C#" Value="public static string PtrToString (IntPtr p);" />
191 <MemberType>Method</MemberType>
193 <ReturnType>System.String</ReturnType>
196 <Parameter Name="p" Type="System.IntPtr" />
200 A <see cref="T:System.IntPtr" /> containing the address of an
201 unmanaged string in the <see cref="T:Mono.Unix.UnixEncoding" />
205 Allocates a managed <see cref="T:System.String" /> and marshals the
206 unmanaged string into the managed string.
209 A <see cref="T:System.String" /> containing a copy of the unmanaged
210 string <paramref name="p" />, or <see langword="null" /> if
211 <paramref name="p" /> is <see cref="F:System.IntPtr.Zero" />.
215 The input string <paramref name="p" /> must have a terminating
216 null <c>0x00</c> byte.
219 This method is identical to
220 <see cref="M:Mono.Unix.UnixMarshal.PtrToString" />(<paramref name="p" />,
221 <see cref="F:Mono.Unix.UnixEncoding.Instance" />).
224 <altmember cref="M:Mono.Unix.UnixMarshal.PtrToStringUnix" />
227 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
228 <AssemblyVersion>2.0.0.0</AssemblyVersion>
231 <Member MemberName="PtrToString">
232 <MemberSignature Language="C#" Value="public static string PtrToString (IntPtr p, System.Text.Encoding encoding);" />
233 <MemberType>Method</MemberType>
235 <ReturnType>System.String</ReturnType>
238 <Parameter Name="p" Type="System.IntPtr" />
239 <Parameter Name="encoding" Type="System.Text.Encoding" />
243 A <see cref="T:System.IntPtr" /> containing the address of an
244 unmanaged string in the <paramref name="encoding" />
247 <param name="encoding">
248 A <see cref="T:System.Text.Encoding" /> specifying which encoding
249 <paramref name="p" /> is in.
252 Allocates a managed <see cref="T:System.String" /> and marshals the
253 unmanaged string into the managed string using the specified
257 A <see cref="T:System.String" /> containing a copy of the unmanaged
258 string <paramref name="p" />, or <see langword="null" /> if
259 <paramref name="p" /> is <see cref="F:System.IntPtr.Zero" />.
263 The input string <paramref name="p" /> must have a terminating
264 null. The definition of "terminating null" is fluid in this
265 context, since the size of a terminating null depends upon the
269 A terminating null is a single byte containing the value
270 <c>0x00</c> if <paramref name="encoding" /> is one of the
272 <see cref="T:System.Text.ASCIIEncoding" />,
273 <see cref="T:System.Text.UTF8Encoding" />,
274 <see cref="T:System.Text.UTF7Encoding" />, or
275 <see cref="T:Mono.Unix.UnixEncoding" />.
278 A terminating null is the <see cref="T:System.Int16" /> value
279 <c>0x0000</c> if <paramref name="encoding" /> is
280 <see cref="T:System.Text.UnicodeEncoding" />.
283 Otherwise, the terminating null must consist of a sequence of
284 <see cref="M:System.Text.Encoding.GetMaxByteCount" />(1) bytes
285 having the value <c>0x00</c>.
286 <block subset="none" type="note">
287 This potentially plays havoc with multi-byte encodings, as many
288 multi-byte encodings would only use a single byte for the
289 terminating null, and not the maximum possible number of bytes
290 used for encoding any character to be used for the terminating
294 Any buffer returned by
295 <see cref="M:Mono.Unix.UnixMarshal.StringToHeap" /> will satisfy
299 <exception cref="T:System.ArgumentNullException">
300 <paramref name="encoding" /> is <see langword="null" />.
304 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
305 <AssemblyVersion>2.0.0.0</AssemblyVersion>
308 <Member MemberName="PtrToStringArray">
309 <MemberSignature Language="C#" Value="public static string[] PtrToStringArray (IntPtr stringArray);" />
310 <MemberType>Method</MemberType>
312 <ReturnType>System.String[]</ReturnType>
315 <Parameter Name="stringArray" Type="System.IntPtr" />
318 <param name="stringArray">
319 A <see cref="T:System.IntPtr" /> containing a
320 <c><see cref="T:System.Byte" />**</c> array
321 which follows the ANSI C rules for the <c>argv</c> argument passed
325 Allocates a <see cref="T:System.String" /> array and unmarshals the
326 unmanaged string array into a managed string array.
329 A <see cref="T:System.String" /> array containing all the strings in
330 the unmanaged string array. If <paramref name="stringArray" /> is
331 <see cref="F:System.IntPtr.Zero" />, a string array containing zero
332 elements is returned.
336 This is identical to calling
337 <see cref="M:Mono.Unix.UnixMarshal.PtrToStringArray" />(<paramref name="stringArray" />,
338 <see cref="F:Mono.Unix.UnixEncoding.Instance" />).
343 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
344 <AssemblyVersion>2.0.0.0</AssemblyVersion>
347 <Member MemberName="PtrToStringArray">
348 <MemberSignature Language="C#" Value="public static string[] PtrToStringArray (int count, IntPtr stringArray);" />
349 <MemberType>Method</MemberType>
351 <ReturnType>System.String[]</ReturnType>
354 <Parameter Name="count" Type="System.Int32" />
355 <Parameter Name="stringArray" Type="System.IntPtr" />
359 A <see cref="T:System.Int32" /> containing the number of strings in
360 <paramref name="stringArray" />.
362 <param name="stringArray">
363 A <see cref="T:System.IntPtr" /> containing a
364 <c><see cref="T:System.Byte" />**</c> array.
367 Allocates a <see cref="T:System.String" /> array and unmarshals the
368 unmanaged string array into a managed string array.
371 A <see cref="T:System.String" /> array containing
372 <paramref name="count" /> strings from the
373 unmanaged string array <paramref name="stringArray" />.
374 If <paramref name="stringArray" /> is
375 <see cref="F:System.IntPtr.Zero" />, a string array containing zero
376 elements is returned.
380 This method is identical to
381 <see cref="M:Mono.Unix.UnixMarshal.PtrToStringArray" /> (<paramref name="count" />, <paramref name="stringArray" />,
382 <see cref="F:Mono.Unix.UnixEncoding.Instance" />).
387 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
388 <AssemblyVersion>2.0.0.0</AssemblyVersion>
391 <Member MemberName="PtrToStringArray">
392 <MemberSignature Language="C#" Value="public static string[] PtrToStringArray (IntPtr stringArray, System.Text.Encoding encoding);" />
393 <MemberType>Method</MemberType>
395 <ReturnType>System.String[]</ReturnType>
398 <Parameter Name="stringArray" Type="System.IntPtr" />
399 <Parameter Name="encoding" Type="System.Text.Encoding" />
402 <param name="stringArray">
403 A <see cref="T:System.IntPtr" /> containing a
404 <c><see cref="T:System.Byte" />**</c> array
405 which follows the ANSI C rules for the <c>argv</c> argument passed
408 <param name="encoding">
409 A <see cref="System.Text.Encoding" /> specifying the encoding of the
410 unmanaged strings within <paramref name="stringArray" />.
413 Allocates a <see cref="T:System.String" /> array and unmarshals the
414 unmanaged string array into a managed string array using the
418 A <see cref="T:System.String" /> array containing all the strings in
419 the unmanaged string array. If <paramref name="stringArray" /> is
420 <see cref="F:System.IntPtr.Zero" />, a string array containing zero
421 elements is returned.
425 <paramref name="stringArray" /> is assumed to be a <c>C</c><c>char**</c> pointer containing a terminating
426 <see cref="F:System.IntPtr.Zero" /> pointer to designate the end
427 of the array. This follows the requirements for <c>argv</c> in
428 the ANSI C <c>main</c> function declaration.
430 <code lang="C">static const char*
438 The final null string will not be returned from this method; the
439 above <b>stringArray</b> declaration would create an array
440 containing two elements if passed through this method.
443 <exception cref="T:System.ArgumentNullException">
444 <paramref name="encoding" /> is <see langword="null" />.
448 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
449 <AssemblyVersion>2.0.0.0</AssemblyVersion>
452 <Member MemberName="PtrToStringArray">
453 <MemberSignature Language="C#" Value="public static string[] PtrToStringArray (int count, IntPtr stringArray, System.Text.Encoding encoding);" />
454 <MemberType>Method</MemberType>
456 <ReturnType>System.String[]</ReturnType>
459 <Parameter Name="count" Type="System.Int32" />
460 <Parameter Name="stringArray" Type="System.IntPtr" />
461 <Parameter Name="encoding" Type="System.Text.Encoding" />
465 A <see cref="T:System.Int32" /> containing the number of strings in
466 <paramref name="stringArray" />.
468 <param name="stringArray">
469 A <see cref="T:System.IntPtr" /> containing a
470 <c><see cref="T:System.Byte" />**</c> array.
472 <param name="encoding">
473 A <see cref="System.Text.Encoding" /> specifying the encoding of the
474 unmanaged strings within <paramref name="stringArray" />.
477 Allocates a <see cref="T:System.String" /> array and unmarshals the
478 unmanaged string array into a managed string array using the
482 A <see cref="T:System.String" /> array containing
483 <paramref name="count" /> strings from the
484 unmanaged string array <paramref name="stringArray" />.
485 If <paramref name="stringArray" /> is
486 <see cref="F:System.IntPtr.Zero" />, a string array containing zero
487 elements is returned.
491 No validation is done to ensure that the pointers for embedded
492 strings are valid. This could result in an access violation or
493 corrupted strings if you're not careful. Embedded null pointers
494 will become <see langword="null" /> strings within the returned
498 The difference between this method and
499 <see cref="M:Mono.Unix.UnixMarshal.PtrToStringArray(System.IntPtr,System.Text.Encoding)" />
500 is that this method doesn't require a terminating null pointer.
503 <exception cref="T:System.ArgumentNullException">
504 <paramref name="encoding" /> is <see langword="null" />.
508 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
509 <AssemblyVersion>2.0.0.0</AssemblyVersion>
512 <Member MemberName="PtrToStringUnix">
513 <MemberSignature Language="C#" Value="public static string PtrToStringUnix (IntPtr p);" />
514 <MemberType>Method</MemberType>
516 <ReturnType>System.String</ReturnType>
519 <Parameter Name="p" Type="System.IntPtr" />
523 A <see cref="T:System.IntPtr" /> containing the address of an
524 unmanaged string in the <see cref="T:Mono.Unix.UnixEncoding" />
528 Allocates a managed <see cref="T:System.String" /> and marshals the
529 unmanaged string into the managed string using the
530 <see cref="T:Mono.Unix.UnixEncoding" /> encoding.
533 A <see cref="T:System.String" /> containing a copy of the unmanaged
534 string <paramref name="p" />, or <see langword="null" /> if
535 <paramref name="p" /> is <see cref="F:System.IntPtr.Zero" />.
539 The input string <paramref name="p" /> must have a terminating
540 null <c>0x00</c> byte.
543 This is an optimized version of
544 <see cref="M:Mono.Unix.UnixMarshal.PtrToString(System.IntPtr)" />
545 for the <see cref="T:Mono.Unix.UnixEncoding" /> encoding.
550 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
551 <AssemblyVersion>2.0.0.0</AssemblyVersion>
554 <Member MemberName="ReAllocHeap">
555 <MemberSignature Language="C#" Value="public static IntPtr ReAllocHeap (IntPtr ptr, long size);" />
556 <MemberType>Method</MemberType>
558 <ReturnType>System.IntPtr</ReturnType>
561 <Parameter Name="ptr" Type="System.IntPtr" />
562 <Parameter Name="size" Type="System.Int64" />
566 A <see cref="T:System.IntPtr" /> containing the address of the
567 memory block to resize. This value must either be
568 <see cref="F:System.IntPtr.Zero" /> or a value previously returned
569 by <see cref="M:Mono.Unix.UnixMarshal.AllocHeap" /> or
570 <see cref="M:Mono.Unix.UnixMarshal.ReAllocHeap" />.
573 A <see cref="T:System.Int64" /> containing the number of bytes to
574 allocate on the system heap.
577 Changes the size of the memory block <paramref name="ptr" /> to
578 refer to <paramref name="size" /> bytes of memory on the system
583 A <see cref="T:System.IntPtr" /> containing the address of
584 <paramref name="size" /> bytes on the system heap, or
585 <see cref="F:System.IntPtr.Zero" /> if the memory could not be
588 <block subset="none" type="note">
589 If <see cref="F:System.IntPtr.Zero" /> is returned,
590 <paramref name="ptr" /> is still a valid memory address, and must
596 This function changes the size of the previously allocated memory
597 referenced by <paramref name="ptr" /> to <paramref name="size" />
598 bytes. <paramref name="ptr" />
599 must have been previously allocated via
600 <see cref="M:Mono.Unix.UnixMarshal.AllocHeap" /> or
601 <see cref="M:Mono.Unix.UnixMarshal.ReAllocHeap" />, or
602 <paramref name="ptr" /> must be the
603 value <see cref="F:System.IntPtr.Zero" /> (in which case this
604 method is identical to
605 <see cref="M:Mono.Unix.UnixMarshal.AllocHeap" />).
606 The contents of the memory are unchanged up to the lesser
607 of the new and old sizes. If the new size is larger, the value of
608 the newly allocated portion of the memory is undefined.
611 The memory allocated by this function must be freed via
612 <see cref="M:Mono.Unix.UnixMarshal.FreeHeap" /> to avoid a memory
615 <block subset="none" type="note">
617 If the requested memory cannot be allocated,
618 <see cref="F:System.IntPtr.Zero" /> is returned and
619 the memory referenced by <paramref name="ptr" /> is valid and
623 If memory can be allocated, the memory referenced by
624 <paramref name="ptr" /> is freed and a pointer to the
625 newly allocated memory is returned. Note that this may be
626 different from the value passed as <paramref name="ptr" />.
630 The "system heap" is where dynamic memory is allocated by the
631 runtime C library, <c>MSVCRT.DLL</c> on Win32 and <c>libc</c> on
635 <exception cref="T:System.ArgumentOutOfRangeException">
636 <paramref name="size" /> is a negative value.
638 <altmember cref="M:Mono.Unix.UnixMarshal.FreeHeap" />
639 <altmember cref="M:Mono.Unix.Native.Stdlib.realloc" />
642 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
643 <AssemblyVersion>2.0.0.0</AssemblyVersion>
646 <Member MemberName="ShouldRetrySyscall">
647 <MemberSignature Language="C#" Value="public static bool ShouldRetrySyscall (int r);" />
648 <MemberType>Method</MemberType>
650 <ReturnType>System.Boolean</ReturnType>
653 <Parameter Name="r" Type="System.Int32" />
657 A <see cref="T:System.Int32" /> containing the return value of a
658 method from <see cref="T:Mono.Unix.Native.Syscall" />.
661 Returns a <see cref="T:System.Boolean" /> indicating whether a
662 system call should be retried.
665 Returns <see langword="true" /> if <paramref name="r" /> is
666 <c>-1</c> and <see cref="M:Mono.Unix.Native.Stdlib.GetLastError" />
667 returns <see cref="F:Mono.Unix.Native.Errno.EINTR" />.
668 Otherwise, <see langword="false" /> is returned.
672 System calls may need to be restarted for a variety of reasons,
673 generally explained within the system call documentation. The
674 most typical reason is that the system call was interrupted, and
675 the caller is expected to re-invoke the system call to complete
681 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
682 <AssemblyVersion>2.0.0.0</AssemblyVersion>
685 <Member MemberName="ShouldRetrySyscall">
686 <MemberSignature Language="C#" Value="public static bool ShouldRetrySyscall (int r, out Mono.Unix.Native.Errno errno);" />
687 <MemberType>Method</MemberType>
689 <ReturnType>System.Boolean</ReturnType>
692 <Parameter Name="r" Type="System.Int32" />
693 <Parameter Name="errno" Type="Mono.Unix.Native.Errno&" RefType="out" />
697 A <see cref="T:System.Int32" /> containing the return value of a
698 method from <see cref="T:Mono.Unix.Native.Syscall" />.
701 A reference to a <see cref="T:Mono.Unix.Native.Errno" /> variable
702 which will capture the last error value.
705 Returns a <see cref="T:System.Boolean" /> indicating whether a
706 system call should be retried, saving the last error value for later
710 Returns <see langword="true" /> if <paramref name="r" /> is
711 <c>-1</c> and <see cref="M:Mono.Unix.Native.Stdlib.GetLastError" />
712 returns <see cref="F:Mono.Unix.Native.Errno.EINTR" />, in which case
713 <paramref name="errno" /> will have the value
714 <see cref="F:Mono.Unix.Native.Errno.EINTR" />.
715 Otherwise, <see langword="false" /> is returned, and
716 <paramref name="errno" /> will store the value from the call to
717 <see cref="M:Mono.Unix.Native.Stdlib.GetLastError" />.
721 System calls may need to be restarted for a variety of reasons,
722 generally explained within the system call documentation. The
723 most typical reason is that the system call was interrupted, and
724 the caller is expected to re-invoke the system call to complete
728 This method saves the last error value returned from
729 <see cref="M:Mono.Unix.Native.Stdlib.GetLastError" /> into the
730 <paramref name="errno" /> parameter.
735 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
736 <AssemblyVersion>2.0.0.0</AssemblyVersion>
740 <AttributeName>System.CLSCompliant(false)</AttributeName>
744 <Member MemberName="StringToHeap">
745 <MemberSignature Language="C#" Value="public static IntPtr StringToHeap (string s);" />
746 <MemberType>Method</MemberType>
748 <ReturnType>System.IntPtr</ReturnType>
751 <Parameter Name="s" Type="System.String" />
755 A <see cref="T:System.String" /> to copy into the system heap.
758 Allocates a copy of <paramref name="s" /> on the system heap in the
759 <see cref="T:Mono.Unix.UnixEncoding" /> encoding.
762 A <see cref="T:System.IntPtr" /> containing a pointer on the system
763 heap containing the marshaled string. If <paramref name="s" /> is
764 <see langword="null" />, then <see cref="F:System.IntPtr.Zero" /> is
769 The pointer returned should be freed with
770 <see cref="M:Mono.Unix.UnixMarshal.FreeHeap" /> to avoid a memory
775 <see cref="M:Mono.Unix.UnixMarshal.StringToHeap" />(<paramref name="s" />,
776 <see cref="F:Mono.Unix.UnixMarshal.Instance" />).
779 <exception cref="T:System.NotSupportedException">
780 There was an error marshaling <paramref name="s" /> into the
781 <see cref="T:Mono.Unix.UnixEncoding" /> encoding.
783 <exception cref="T:Mono.Unix.UnixIOException">
784 Unable to allocate enough memory for the marshaled string.
785 [<see cref="F:Mono.Unix.Native.Errno.ENOMEM" />]
787 <altmember cref="M:Mono.Unix.UnixMarshal.FreeHeap" />
790 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
791 <AssemblyVersion>2.0.0.0</AssemblyVersion>
794 <Member MemberName="StringToHeap">
795 <MemberSignature Language="C#" Value="public static IntPtr StringToHeap (string s, System.Text.Encoding encoding);" />
796 <MemberType>Method</MemberType>
798 <ReturnType>System.IntPtr</ReturnType>
801 <Parameter Name="s" Type="System.String" />
802 <Parameter Name="encoding" Type="System.Text.Encoding" />
806 A <see cref="T:System.String" /> to copy into the system heap.
808 <param name="encoding">
809 A <see cref="T:System.Text.Encoding" /> specifying which encoding to
810 marshal the string into.
813 Allocates a copy of <paramref name="s" /> on the system heap in the
814 <paramref name="encoding" /> encoding.
817 A <see cref="T:System.IntPtr" /> containing a pointer on the system
818 heap containing the marshaled string. If <paramref name="s" /> is
819 <see langword="null" />, then <see cref="F:System.IntPtr.Zero" /> is
824 The pointer returned should be freed with
825 <see cref="M:Mono.Unix.UnixMarshal.FreeHeap" /> to avoid a memory
830 <see cref="M:Mono.Unix.UnixMarshal.StringToHeap" />(<paramref name="s" />, 0, <i>s.Length</i>,
831 <see cref="F:Mono.Unix.UnixMarshal.Instance" />).
834 <exception cref="T:System.ArgumentNullException">
835 <paramref name="encoding" /> is <see langword="null" />.
837 <exception cref="T:System.NotSupportedException">
838 There was an error marshaling <paramref name="s" /> into the
839 specified encoding <paramref name="encoding" />.
841 <exception cref="T:Mono.Unix.UnixIOException">
842 Unable to allocate enough memory for the marshaled string.
843 [<see cref="F:Mono.Unix.Native.Errno.ENOMEM" />]
845 <altmember cref="M:Mono.Unix.UnixMarshal.FreeHeap" />
848 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
849 <AssemblyVersion>2.0.0.0</AssemblyVersion>
852 <Member MemberName="StringToHeap">
853 <MemberSignature Language="C#" Value="public static IntPtr StringToHeap (string s, int index, int count);" />
854 <MemberType>Method</MemberType>
856 <ReturnType>System.IntPtr</ReturnType>
859 <Parameter Name="s" Type="System.String" />
860 <Parameter Name="index" Type="System.Int32" />
861 <Parameter Name="count" Type="System.Int32" />
865 A <see cref="T:System.String" /> to copy into the system heap.
868 A <see cref="T:System.Int32" /> containing the start index into
869 <paramref name="s" /> to start marshaling.
872 A <see cref="T:System.Int32" /> containing the number of characters
873 to marshal from <paramref name="s" /> starting at index
874 <paramref name="index" />.
877 Allocates a copy of <paramref name="s" /> on the system heap in the
878 <see cref="T:Mono.Unix.UnixEncoding" /> encoding.
881 A <see cref="T:System.IntPtr" /> containing a pointer on the system
882 heap containing the marshaled string. If <paramref name="s" /> is
883 <see langword="null" />, then <see cref="F:System.IntPtr.Zero" /> is
888 The pointer returned should be freed with
889 <see cref="M:Mono.Unix.UnixMarshal.FreeHeap" /> to avoid a memory
894 <see cref="M:Mono.Unix.UnixMarshal.StringToHeap" />(<paramref name="s" />, <paramref name="count" />,
895 <paramref name="index" />,
896 <see cref="F:Mono.Unix.UnixMarshal.Instance" />).
899 <exception cref="T:System.ArgumentOutOfRangeException">
901 <paramref name="count" /> or <paramref name="index" /> is less
906 <paramref name="index" /> plus <paramref name="count" /> is
907 greater than the length of <paramref name="s" />.
910 <exception cref="T:System.NotSupportedException">
911 There was an error marshaling <paramref name="s" /> into the
912 <see cref="T:Mono.Unix.UnixEncoding" /> encoding.
914 <exception cref="T:Mono.Unix.UnixIOException">
915 Unable to allocate enough memory for the marshaled string.
916 [<see cref="F:Mono.Unix.Native.Errno.ENOMEM" />]
918 <altmember cref="M:Mono.Unix.UnixMarshal.FreeHeap" />
921 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
922 <AssemblyVersion>2.0.0.0</AssemblyVersion>
925 <Member MemberName="StringToHeap">
926 <MemberSignature Language="C#" Value="public static IntPtr StringToHeap (string s, int index, int count, System.Text.Encoding encoding);" />
927 <MemberType>Method</MemberType>
929 <ReturnType>System.IntPtr</ReturnType>
932 <Parameter Name="s" Type="System.String" />
933 <Parameter Name="index" Type="System.Int32" />
934 <Parameter Name="count" Type="System.Int32" />
935 <Parameter Name="encoding" Type="System.Text.Encoding" />
939 A <see cref="T:System.String" /> to copy into the system heap.
942 A <see cref="T:System.Int32" /> containing the start index into
943 <paramref name="s" /> to start marshaling.
946 A <see cref="T:System.Int32" /> containing the number of characters
947 to marshal from <paramref name="s" /> starting at index
948 <paramref name="index" />.
950 <param name="encoding">
951 A <see cref="T:System.Text.Encoding" /> specifying which encoding to
952 marshal the string into.
955 Allocates a copy of <paramref name="s" /> on the system heap in the
956 <paramref name="encoding" /> encoding.
959 A <see cref="T:System.IntPtr" /> containing a pointer on the system
960 heap containing the marshaled string. If <paramref name="s" /> is
961 <see langword="null" />, then <see cref="F:System.IntPtr.Zero" /> is
966 The pointer returned should be freed with
967 <see cref="M:Mono.Unix.UnixMarshal.FreeHeap" /> to avoid a memory
971 <exception cref="T:System.ArgumentNullException">
972 <paramref name="encoding" /> is <see langword="null" />.
974 <exception cref="T:System.ArgumentOutOfRangeException">
976 <paramref name="count" /> or <paramref name="index" /> is less
981 <paramref name="index" /> plus <paramref name="count" /> is
982 greater than the length of <paramref name="s" />.
985 <exception cref="T:System.NotSupportedException">
986 There was an error marshaling <paramref name="s" /> into the
987 specified encoding <paramref name="encoding" />.
989 <exception cref="T:Mono.Unix.UnixIOException">
990 Unable to allocate enough memory for the marshaled string.
991 [<see cref="F:Mono.Unix.Native.Errno.ENOMEM" />]
993 <altmember cref="M:Mono.Unix.UnixMarshal.FreeHeap" />
996 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
997 <AssemblyVersion>2.0.0.0</AssemblyVersion>
1000 <Member MemberName="ThrowExceptionForError">
1001 <MemberSignature Language="C#" Value="public static void ThrowExceptionForError (Mono.Unix.Native.Errno errno);" />
1002 <MemberType>Method</MemberType>
1004 <ReturnType>System.Void</ReturnType>
1007 <Parameter Name="errno" Type="Mono.Unix.Native.Errno" />
1010 <param name="errno">
1011 A <see cref="T:Mono.Unix.Native.Errno" /> specifying the exception
1015 Throws an exception that best matches <paramref name="errno" />.
1019 This method translates <paramref name="errno" /> into its closest
1020 matching exception type, and throws the exception.
1023 If the exception thrown is not a
1024 <see cref="T:Mono.Unix.UnixIOException" />, then the exception's
1025 <see cref="P:System.Exception.InnerException" /> property will
1026 be set to a <see cref="T:Mono.Unix.UnixIOException" /> instance
1027 wrapping <paramref name="errno" />, if possible.
1028 <block subset="none" type="note"><see cref="T:System.ArgumentOutOfRangeException" /> does not
1030 <see cref="P:System.Exception.InnerException" /> property set, as
1031 <see cref="T:System.ArgumentOutOfRangeException" /> does not
1032 provide a constructor that sets this property.
1035 <exception cref="T:System.ArgumentException">
1036 <paramref name="errno" />
1038 <see cref="F:Mono.Unix.Native.Errno.EBADF" /> or
1039 <see cref="F:Mono.Unix.Native.Errno.EINVAL" />.
1041 <exception cref="T:System.ArgumentOutOfRangeException">
1042 <paramref name="errno" />
1044 <see cref="F:Mono.Unix.Native.Errno.ERANGE" />.
1046 <exception cref="T:System.InvalidOperationException">
1047 <paramref name="errno" />
1049 <see cref="F:Mono.Unix.Native.Errno.EOPNOTSUPP" /> or
1050 <see cref="F:Mono.Unix.Native.Errno.EPERM" />.
1052 <exception cref="T:System.InvalidProgramException">
1053 <paramref name="errno" />
1055 <see cref="F:Mono.Unix.Native.Errno.ENOEXEC" />.
1057 <exception cref="T:System.NullReferenceException">
1058 <paramref name="errno" />
1060 <see cref="F:Mono.Unix.Native.Errno.EFAULT" />.
1062 <exception cref="T:System.OverflowException">
1063 <paramref name="errno" />
1065 <see cref="F:Mono.Unix.Native.Errno.EOVERFLOW" />.
1067 <exception cref="T:System.UnauthorizedAccessException">
1068 <paramref name="errno" />
1070 <see cref="F:Mono.Unix.Native.Errno.EACCES" /> or
1071 <see cref="F:Mono.Unix.Native.Errno.EISDIR" />.
1073 <exception cref="T:System.IO.DirectoryNotFoundException">
1074 <paramref name="errno" />
1076 <see cref="F:Mono.Unix.Native.Errno.ENOTDIR" />.
1078 <exception cref="T:System.IO.FileNotFoundException">
1079 <paramref name="errno" />
1081 <see cref="F:Mono.Unix.Native.Errno.ENOENT" />.
1083 <exception cref="T:System.IO.IOException">
1084 <paramref name="errno" />
1086 <see cref="F:Mono.Unix.Native.Errno.EIO" />,
1087 <see cref="F:Mono.Unix.Native.Errno.ENOSPC" />,
1088 <see cref="F:Mono.Unix.Native.Errno.ENOTEMPTY" />,
1089 <see cref="F:Mono.Unix.Native.Errno.ENXIO" />,
1090 <see cref="F:Mono.Unix.Native.Errno.EROFS" />,
1091 <see cref="F:Mono.Unix.Native.Errno.ESPIPE" />.
1093 <exception cref="T:System.IO.PathTooLongException">
1094 <paramref name="errno" />
1096 <see cref="F:Mono.Unix.Native.Errno.ENAMETOOLONG" />.
1098 <exception cref="T:Mono.Unix.UnixIOException">
1099 <paramref name="errno" /> is not any of the above error values.
1103 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
1104 <AssemblyVersion>2.0.0.0</AssemblyVersion>
1108 <AttributeName>System.CLSCompliant(false)</AttributeName>
1112 <Member MemberName="ThrowExceptionForErrorIf">
1113 <MemberSignature Language="C#" Value="public static void ThrowExceptionForErrorIf (int retval, Mono.Unix.Native.Errno errno);" />
1114 <MemberType>Method</MemberType>
1116 <ReturnType>System.Void</ReturnType>
1119 <Parameter Name="retval" Type="System.Int32" />
1120 <Parameter Name="errno" Type="Mono.Unix.Native.Errno" />
1123 <param name="retval">
1124 A <see cref="T:System.Int32" /> containing the return value of a
1125 method from <see cref="T:Mono.Unix.Native.Syscall" />.
1127 <param name="errno">
1128 A <see cref="T:Mono.Unix.Native.Errno" /> specifying the exception
1132 Throws an exception that best matches <paramref name="errno" />
1133 if <paramref name="retval" /> is <c>-1</c>.
1137 If <paramref name="retval" /> is <c>-1</c>, then this method is
1138 equivalent to calling
1139 <see cref="M:Mono.Unix.UnixMarshal.ThrowExceptionForError" /> (<paramref name="errno" />).
1140 Otherwise, nothing is done.
1143 If the exception thrown is not a
1144 <see cref="T:Mono.Unix.UnixIOException" />, then the exception's
1145 <see cref="P:System.Exception.InnerException" /> property will
1146 be set to a <see cref="T:Mono.Unix.UnixIOException" /> instance
1147 wrapping <paramref name="errno" />, if possible.
1148 <block subset="none" type="note"><see cref="T:System.ArgumentOutOfRangeException" /> does not
1150 <see cref="P:System.Exception.InnerException" /> property set, as
1151 <see cref="T:System.ArgumentOutOfRangeException" /> does not
1152 provide a constructor that sets this property.
1155 <exception cref="T:System.ArgumentException">
1156 <paramref name="errno" />
1158 <see cref="F:Mono.Unix.Native.Errno.EBADF" /> or
1159 <see cref="F:Mono.Unix.Native.Errno.EINVAL" />.
1161 <exception cref="T:System.ArgumentOutOfRangeException">
1162 <paramref name="errno" />
1164 <see cref="F:Mono.Unix.Native.Errno.ERANGE" />.
1166 <exception cref="T:System.InvalidOperationException">
1167 <paramref name="errno" />
1169 <see cref="F:Mono.Unix.Native.Errno.EOPNOTSUPP" /> or
1170 <see cref="F:Mono.Unix.Native.Errno.EPERM" />.
1172 <exception cref="T:System.InvalidProgramException">
1173 <paramref name="errno" />
1175 <see cref="F:Mono.Unix.Native.Errno.ENOEXEC" />.
1177 <exception cref="T:System.NullReferenceException">
1178 <paramref name="errno" />
1180 <see cref="F:Mono.Unix.Native.Errno.EFAULT" />.
1182 <exception cref="T:System.OverflowException">
1183 <paramref name="errno" />
1185 <see cref="F:Mono.Unix.Native.Errno.EOVERFLOW" />.
1187 <exception cref="T:System.UnauthorizedAccessException">
1188 <paramref name="errno" />
1190 <see cref="F:Mono.Unix.Native.Errno.EACCES" /> or
1191 <see cref="F:Mono.Unix.Native.Errno.EISDIR" />.
1193 <exception cref="T:System.IO.DirectoryNotFoundException">
1194 <paramref name="errno" />
1196 <see cref="F:Mono.Unix.Native.Errno.ENOTDIR" />.
1198 <exception cref="T:System.IO.FileNotFoundException">
1199 <paramref name="errno" />
1201 <see cref="F:Mono.Unix.Native.Errno.ENOENT" />.
1203 <exception cref="T:System.IO.IOException">
1204 <paramref name="errno" />
1206 <see cref="F:Mono.Unix.Native.Errno.EIO" />,
1207 <see cref="F:Mono.Unix.Native.Errno.ENOSPC" />,
1208 <see cref="F:Mono.Unix.Native.Errno.ENOTEMPTY" />,
1209 <see cref="F:Mono.Unix.Native.Errno.ENXIO" />,
1210 <see cref="F:Mono.Unix.Native.Errno.EROFS" />,
1211 <see cref="F:Mono.Unix.Native.Errno.ESPIPE" />.
1213 <exception cref="T:System.IO.PathTooLongException">
1214 <paramref name="errno" />
1216 <see cref="F:Mono.Unix.Native.Errno.ENAMETOOLONG" />.
1218 <exception cref="T:Mono.Unix.UnixIOException">
1219 <paramref name="errno" /> is not any of the above error values.
1223 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
1224 <AssemblyVersion>2.0.0.0</AssemblyVersion>
1228 <AttributeName>System.CLSCompliant(false)</AttributeName>
1232 <Member MemberName="ThrowExceptionForLastError">
1233 <MemberSignature Language="C#" Value="public static void ThrowExceptionForLastError ();" />
1234 <MemberType>Method</MemberType>
1236 <ReturnType>System.Void</ReturnType>
1241 Throws an exception that best matches the last error returned
1242 from <see cref="M:Mono.Unix.Native.Stdlib.GetLastError" />.
1246 This is equivalent to calling
1247 <see cref="M:Mono.Unix.UnixMarshal.ThrowExceptionForError" /> (<see cref="M:Mono.Unix.Native.Stdlib.GetLastError" /> ()).
1250 If the exception thrown is not a
1251 <see cref="T:Mono.Unix.UnixIOException" />, then the exception's
1252 <see cref="P:System.Exception.InnerException" /> property will
1253 be set to a <see cref="T:Mono.Unix.UnixIOException" /> instance
1254 wrapping <paramref name="errno" />, if possible.
1255 <block subset="none" type="note"><see cref="T:System.ArgumentOutOfRangeException" /> does not
1257 <see cref="P:System.Exception.InnerException" /> property set, as
1258 <see cref="T:System.ArgumentOutOfRangeException" /> does not
1259 provide a constructor that sets this property.
1262 <exception cref="T:System.ArgumentException">
1263 <see cref="M:Mono.Unix.Native.Stdlib.GetLastError" />
1265 <see cref="F:Mono.Unix.Native.Errno.EBADF" /> or
1266 <see cref="F:Mono.Unix.Native.Errno.EINVAL" />.
1268 <exception cref="T:System.ArgumentOutOfRangeException">
1269 <see cref="M:Mono.Unix.Native.Stdlib.GetLastError" />
1271 <see cref="F:Mono.Unix.Native.Errno.ERANGE" />.
1273 <exception cref="T:System.InvalidOperationException">
1274 <see cref="M:Mono.Unix.Native.Stdlib.GetLastError" />
1276 <see cref="F:Mono.Unix.Native.Errno.EOPNOTSUPP" /> or
1277 <see cref="F:Mono.Unix.Native.Errno.EPERM" />.
1279 <exception cref="T:System.InvalidProgramException">
1280 <see cref="M:Mono.Unix.Native.Stdlib.GetLastError" />
1282 <see cref="F:Mono.Unix.Native.Errno.ENOEXEC" />.
1284 <exception cref="T:System.NullReferenceException">
1285 <see cref="M:Mono.Unix.Native.Stdlib.GetLastError" />
1287 <see cref="F:Mono.Unix.Native.Errno.EFAULT" />.
1289 <exception cref="T:System.OverflowException">
1290 <see cref="M:Mono.Unix.Native.Stdlib.GetLastError" />
1292 <see cref="F:Mono.Unix.Native.Errno.EOVERFLOW" />.
1294 <exception cref="T:System.UnauthorizedAccessException">
1295 <see cref="M:Mono.Unix.Native.Stdlib.GetLastError" />
1297 <see cref="F:Mono.Unix.Native.Errno.EACCES" /> or
1298 <see cref="F:Mono.Unix.Native.Errno.EISDIR" />.
1300 <exception cref="T:System.IO.DirectoryNotFoundException">
1301 <see cref="M:Mono.Unix.Native.Stdlib.GetLastError" />
1303 <see cref="F:Mono.Unix.Native.Errno.ENOTDIR" />.
1305 <exception cref="T:System.IO.FileNotFoundException">
1306 <see cref="M:Mono.Unix.Native.Stdlib.GetLastError" />
1308 <see cref="F:Mono.Unix.Native.Errno.ENOENT" />.
1310 <exception cref="T:System.IO.IOException">
1311 <see cref="M:Mono.Unix.Native.Stdlib.GetLastError" />
1313 <see cref="F:Mono.Unix.Native.Errno.EIO" />,
1314 <see cref="F:Mono.Unix.Native.Errno.ENOSPC" />,
1315 <see cref="F:Mono.Unix.Native.Errno.ENOTEMPTY" />,
1316 <see cref="F:Mono.Unix.Native.Errno.ENXIO" />,
1317 <see cref="F:Mono.Unix.Native.Errno.EROFS" />,
1318 <see cref="F:Mono.Unix.Native.Errno.ESPIPE" />.
1320 <exception cref="T:System.IO.PathTooLongException">
1321 <see cref="M:Mono.Unix.Native.Stdlib.GetLastError" />
1323 <see cref="F:Mono.Unix.Native.Errno.ENAMETOOLONG" />.
1325 <exception cref="T:Mono.Unix.UnixIOException">
1326 <see cref="M:Mono.Unix.Native.Stdlib.GetLastError" />
1327 is not any of the above error values.
1331 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
1332 <AssemblyVersion>2.0.0.0</AssemblyVersion>
1335 <Member MemberName="ThrowExceptionForLastErrorIf">
1336 <MemberSignature Language="C#" Value="public static void ThrowExceptionForLastErrorIf (int retval);" />
1337 <MemberType>Method</MemberType>
1339 <ReturnType>System.Void</ReturnType>
1342 <Parameter Name="retval" Type="System.Int32" />
1345 <param name="retval">
1346 A <see cref="T:System.Int32" /> containing the return value of a
1347 method from <see cref="T:Mono.Unix.Native.Syscall" />.
1350 Throws an exception that best matches the last error returned
1351 from <see cref="M:Mono.Unix.Native.Stdlib.GetLastError" /> if
1352 <paramref name="retval" /> is <c>-1</c>.
1356 If <paramref name="retval" /> is <c>-1</c>, then this method is
1357 equivalent to calling
1358 <see cref="M:Mono.Unix.UnixMarshal.ThrowExceptionForError" /> (<see cref="M:Mono.Unix.Native.Stdlib.GetLastError" /> ()).
1359 Otherwise, nothing is done.
1362 If the exception thrown is not a
1363 <see cref="T:Mono.Unix.UnixIOException" />, then the exception's
1364 <see cref="P:System.Exception.InnerException" /> property will
1365 be set to a <see cref="T:Mono.Unix.UnixIOException" /> instance
1366 wrapping <paramref name="errno" />, if possible.
1367 <block subset="none" type="note"><see cref="T:System.ArgumentOutOfRangeException" /> does not
1369 <see cref="P:System.Exception.InnerException" /> property set, as
1370 <see cref="T:System.ArgumentOutOfRangeException" /> does not
1371 provide a constructor that sets this property.
1374 <exception cref="T:System.ArgumentException">
1375 <see cref="M:Mono.Unix.Native.Stdlib.GetLastError" />
1377 <see cref="F:Mono.Unix.Native.Errno.EBADF" /> or
1378 <see cref="F:Mono.Unix.Native.Errno.EINVAL" />.
1380 <exception cref="T:System.ArgumentOutOfRangeException">
1381 <see cref="M:Mono.Unix.Native.Stdlib.GetLastError" />
1383 <see cref="F:Mono.Unix.Native.Errno.ERANGE" />.
1385 <exception cref="T:System.InvalidOperationException">
1386 <see cref="M:Mono.Unix.Native.Stdlib.GetLastError" />
1388 <see cref="F:Mono.Unix.Native.Errno.EOPNOTSUPP" /> or
1389 <see cref="F:Mono.Unix.Native.Errno.EPERM" />.
1391 <exception cref="T:System.InvalidProgramException">
1392 <see cref="M:Mono.Unix.Native.Stdlib.GetLastError" />
1394 <see cref="F:Mono.Unix.Native.Errno.ENOEXEC" />.
1396 <exception cref="T:System.NullReferenceException">
1397 <see cref="M:Mono.Unix.Native.Stdlib.GetLastError" />
1399 <see cref="F:Mono.Unix.Native.Errno.EFAULT" />.
1401 <exception cref="T:System.OverflowException">
1402 <see cref="M:Mono.Unix.Native.Stdlib.GetLastError" />
1404 <see cref="F:Mono.Unix.Native.Errno.EOVERFLOW" />.
1406 <exception cref="T:System.UnauthorizedAccessException">
1407 <see cref="M:Mono.Unix.Native.Stdlib.GetLastError" />
1409 <see cref="F:Mono.Unix.Native.Errno.EACCES" /> or
1410 <see cref="F:Mono.Unix.Native.Errno.EISDIR" />.
1412 <exception cref="T:System.IO.DirectoryNotFoundException">
1413 <see cref="M:Mono.Unix.Native.Stdlib.GetLastError" />
1415 <see cref="F:Mono.Unix.Native.Errno.ENOTDIR" />.
1417 <exception cref="T:System.IO.FileNotFoundException">
1418 <see cref="M:Mono.Unix.Native.Stdlib.GetLastError" />
1420 <see cref="F:Mono.Unix.Native.Errno.ENOENT" />.
1422 <exception cref="T:System.IO.IOException">
1423 <see cref="M:Mono.Unix.Native.Stdlib.GetLastError" />
1425 <see cref="F:Mono.Unix.Native.Errno.EIO" />,
1426 <see cref="F:Mono.Unix.Native.Errno.ENOSPC" />,
1427 <see cref="F:Mono.Unix.Native.Errno.ENOTEMPTY" />,
1428 <see cref="F:Mono.Unix.Native.Errno.ENXIO" />,
1429 <see cref="F:Mono.Unix.Native.Errno.EROFS" />,
1430 <see cref="F:Mono.Unix.Native.Errno.ESPIPE" />.
1432 <exception cref="T:System.IO.PathTooLongException">
1433 <see cref="M:Mono.Unix.Native.Stdlib.GetLastError" />
1435 <see cref="F:Mono.Unix.Native.Errno.ENAMETOOLONG" />.
1437 <exception cref="T:Mono.Unix.UnixIOException">
1438 <see cref="M:Mono.Unix.Native.Stdlib.GetLastError" />
1439 is not any of the above error values.
1443 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
1444 <AssemblyVersion>2.0.0.0</AssemblyVersion>