public class CoreDataResource extends Object
A Core Data Resource can be a directory in the event that it contains version information. In that case, the path will be the root name of the directory and it will contain a nonnull version info object which contains all file paths for each versioned file as well as a .xccurrentversion file which is an XML file pointing to the name of the current file.
In the event that it is not versioned, the versionInfo will be empty and the path itself will simply be the path to the core data model object file.
Modifier and Type | Class and Description |
---|---|
static class |
CoreDataResource.VersionInformation
Details the version information for a core data file.
|
Constructor and Description |
---|
CoreDataResource(Path path,
Optional<CoreDataResource.VersionInformation> versionInfo) |
Modifier and Type | Method and Description |
---|---|
static CoreDataResource |
fromResourceArgs(AppleWrapperResourceArg dataModel,
ProjectFilesystem projectFilesystem)
Creates a CoreDataResource object from an AppleWrapperResourceArg
|
Path |
getPath() |
Optional<CoreDataResource.VersionInformation> |
versionInfo() |
public CoreDataResource(Path path, Optional<CoreDataResource.VersionInformation> versionInfo)
public Path getPath()
public Optional<CoreDataResource.VersionInformation> versionInfo()
public static CoreDataResource fromResourceArgs(AppleWrapperResourceArg dataModel, ProjectFilesystem projectFilesystem) throws IOException
dataModel
- The resource to convert.projectFilesystem
- The file system to use for verifying version information.IOException