Class ResourceUtil
java.lang.Object
com.inductiveautomation.ignition.common.util.ResourceUtil
-
Field Summary
FieldsModifier and TypeFieldDescriptionFilenames that are reserved for use by the Windows OS, and will cause errors if you attempt to create them on the filesystem.static final Comparator<ProjectResource> -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> TdecodeOrCreate(ProjectResource r, XMLDeserializer deserializer, Class<T> clazz, LoggerEx log) static <T> TdecodeOrNull(byte[] data, XMLDeserializer deserializer, Class<T> clazz) static <T> TdecodeOrNull(ProjectResource r, XMLDeserializer deserializer, Class<T> clazz) static Stringstatic StringgetValidFolderName(String folderName) static StringgetValidResourceName(String resourceName) static booleanisLegalName(String proposedName) static StringsubPath(ProjectResource resource)
-
Field Details
-
INVALID_WINDOWS_FILENAMES
Filenames that are reserved for use by the Windows OS, and will cause errors if you attempt to create them on the filesystem. -
SORT_BY_MOST_RECENT
-
-
Method Details
-
getResourceName
-
subPath
- Returns:
- the
ResourcePath.getPath()of the resource, or null if the resource was null.
-
decodeOrCreate
public static <T> T decodeOrCreate(ProjectResource r, XMLDeserializer deserializer, Class<T> clazz, LoggerEx log) throws Exception - Throws:
Exception
-
decodeOrNull
@Nullable public static <T> T decodeOrNull(ProjectResource r, XMLDeserializer deserializer, Class<T> clazz) throws Exception - Throws:
Exception
-
decodeOrNull
@Nullable public static <T> T decodeOrNull(byte[] data, XMLDeserializer deserializer, Class<T> clazz) throws Exception - Throws:
Exception
-
getValidResourceName
- Returns:
- a resource name that can be written to disk. In the case of a singletons, a null value or an improper name returns null.
-
getValidFolderName
-
isLegalName
- Returns:
trueif this resource name is valid for all supported filesystems
-