Add platform specific codes to a Portable Class Library
<p>Hi I'm trying to create a NoSQL Database that would work on Android, UWP and IOS to use for my own project and to publish on nuget for others. </p>

<p>So I need to be able to create, delete, write and read files on all of these platforms. </p>

<p>I'm looking for a way to do all of this platform specific coding in the PCL itself or a link to a source that explains how to make and publish a portable-friendly API or simply how to write platform specific codes in the portable class itself.</p>

<p>btw i've already tried to use the #if UWP #endif and made a test project but since it's a portable class library it just ignores it when it runs.</p>

<p>example:</p>

<pre><code>public void CreateFile(string path) {
    if (Platform == UWP) {

    }
    if (Platform == Android) {
        //Create file for UWP
    }
    if (Platform == IOS) {
        //Create file for UWP
    }
}
</code></pre>