OOP implementation of in-memory file system
I'd say Root is a misnomer here, since at first glance I imagined it to represent the filesystem root (i.e. the / directory), not the root of your class tree. Moreover, instead of deriving File and Directory from a common (abstract) ancestor, I'd derive Directory from File instead, since that's what most real filesystems do anyway, i.e. they treat directories as special files.

size should not be a writable property; the File object should always calculate it based on its content. This can ensure there's no discrepancy between the stored size and the actual size of the file's content. Also, why doesn't Directory have a getSize() method? It could just call getSize() on all its children and add up the results.

You have a writable attribute on your objects, but you don't seem to be using it, e.g. in setName() you just replace the name of the object without checking if it's writable. Similarly, you have a parent argument in the constructor, but you don't use it; I'd expect the File to call addContent() on its parent automatically if the parent is specified in the constructor.

As for further features, I'd recommend making your Directory class iterable (so it can be used in for loops), as well as implementing the most common collection methods, such as forEach, has, length (i.e. the number of files in the directory), etc., instead of just exposing the array of children.