Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ GetRandomFileName()

static unsafe string System.IO.Path.GetRandomFileName ( )
inlinestatic

Definition at line 254 of file Path.cs.

255 {
256 byte* ptr = stackalloc byte[8];
257 Interop.GetRandomBytes(ptr, 8);
258 return string.Create(12, (IntPtr)ptr, delegate(Span<char> span, IntPtr key)
259 {
260 Populate83FileNameFromRandomBytes((byte*)(void*)key, 8, span);
261 });
262 }
static unsafe void GetRandomBytes(byte *buffer, int length)
Definition Interop.cs:1871
static unsafe void Populate83FileNameFromRandomBytes(byte *bytes, int byteCount, Span< char > chars)
Definition Path.cs:724

References Interop.GetRandomBytes(), System.key, and System.IO.Path.Populate83FileNameFromRandomBytes().

Referenced by System.IO.IsolatedStorage.Helper.GetRandomDirectory().