Is the word 'outside' a preposition or a noun in this context?

          ’Twas brillig, and the slithy toves
             Did gyre and gimble in the wabe:
        All mimsy were the borogoves,
             And the mome raths outgrabe.

It sounds like you think that a word “is” some part of speech, and that it can therefore “turn” into another one. That isn’t quite how it works, although the concept of zero derivation is when you use a word in a different grammatical way without any change to the form.

Many -side words in English began life as compound words: alongside, aside, beside, broadside, dayside, fireside, hillside, inside, mountainside, nightside, offside, otherside, outside, overside, southside, topside, trailside, underside, wayside, woodside, yonside are just a few of them.

When the word that -side was attached to began life as a noun, the result usually did, too, but when the original word began life as an adverb, so too the result — at first. Then some of the whilom adverbs started to be used as prepositions or as nouns, or as both.

Here's an example that uses outside as five different parts of speech, which you can tell because of the syntax (word order) and inflectional morphology (endings):

  1. If you go outside(adverb),
  2. you’ll see that the outside(adjective) buildings,
  3. meaning the ones outside(preposition) the perimeter,
  4. aren’t so well maintained on their outsides(noun) as they are on their insides.
  5. This shows that they haven’t been outsided(verb) well enough.

You know what the parts of speech are up there in that sample passage for the same reason you know what they are in Carroll. It’s the grammar that matters. You should go through each of those five examples and look at the many clues pointing you towards each one’s part of speech.

As with all things grammatical, that means you need to look at syntax and morphology. I’ll let you use the same skills on my example as are needed on your own.

The outside of the folder got wet.

In your example, because the predicate is “got wet”, then you know that the subject is “the outside of the folder”, and that means it has to be a noun phrase of some sort. That outside there MUST be a noun in the outside of the folder because it’s got a determiner the in front of it and there’s no other parse that leaves a valid subject.

Prepositional phrases can be deleted from a sentence without changing the grammaticality of the sentence. If outside of were a two-word preposition whose object were the folder, then we could delete the whole thing:

The outside of the folder got wet.
✱The got wet.

We can't do that, because "The got wet" is not grammatical. Therefore outside of the folder is not here a prepositional phrase.

But what about of the folder? Can we delete that safely?

The outside of the folder got wet.
The outside got wet.

Yes, we can. That one is ok, which means that outside is here a noun.

It is easily possible to construct a version where outside really is a preposition though.

Outside of the folder, the papers got wet.

Now outside of really is a two-word preposition, not a noun plus a preposition. You know this because it’s the only valid parse.