Modules (188)

InMemoryFile

Description

Represents a file that will never exist on disk - a placeholder backing file for untitled Documents. NO ONE other than DocumentManager should create instances of InMemoryFile. It is valid to test for one (instanceof InMemoryFile), but it's better to check doc.isUntitled where possible.

Attempts to read/write an InMemoryFile will always fail, and exists() always yields false. InMemoryFile.fullPath is just a placeholder, and should not be displayed anywhere in the UI; fullPath IS guaranteed to be unique, however.

An InMemoryFile is not added to the filesystem index, so if you ask the filesystem anything about this object, it won't know what you're talking about (filesystem.getFileForPath(someInMemFile.fullPath) will not return someInMemFile).

Dependencies