Package com.thingworx.things.repository
Class FileRepositoryThing
- java.lang.Object
-
- com.thingworx.types.NamedObject
-
- com.thingworx.persistence.common.PersistableNamedObject
-
- com.thingworx.entities.RootEntity
-
- com.thingworx.things.Thing
-
- com.thingworx.things.repository.FileRepositoryThing
-
- All Implemented Interfaces:
ISupportsAccessModifier
,IConfigurableObject
,INotScriptFriendly
,IRepository
,ISupportsDeprecation
,IDiffableObject
,IAlertProvider
,IAvatar
,IEntityLifeCycleEvent
,IEventMetadataProvider
,IEventProvider
,IPersistable
,IPropertyProvider
,IServiceMetadataProvider
,IServiceProvider
,IShapeProvider
,ITaggableObject
,IDependencyScannableObject
,IHierarchicalEntity
,IEntityDefinition
,IPersistableObject<java.lang.String>
,IDesignTimeSecurable
,IDesignTimeSecurableEntity
,IRunTimeSecurable
,IRunTimeSecurableEntity
,ISecurable
,IVisibilitySecurable
,IVisibilitySecurableEntity
,IEventProcessor
,IAspectContainer
,INamedObject
,java.io.Serializable
@ThingworxExtensionApiClass(since={6,6}, canInstantiate=true) public class FileRepositoryThing extends Thing implements IRepository
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FileRepositoryThing.CompressionType
static class
FileRepositoryThing.FileMode
-
Field Summary
Fields Modifier and Type Field Description static int
BUFFER_SIZE
static double
DEFAULT_MAX_FILE_SIZE
static double
DEFAULT_TRANSFER_BLOCK_SIZE
static java.lang.String
DIRECTORY_DATASHAPE
static java.lang.String
FILE_DATASHAPE
static java.lang.String
FILE_DATASHAPE_WITH_LINKS
static java.lang.String
IBM_ENCODING
-
Fields inherited from class com.thingworx.things.Thing
_logger, BUILT_IN_PROPERTY_DEFINITIONS, DATASHAPE_INCOMING_LOCAL_PROPERTY_BINDING, DEFAULT_SETTINGS_TABLE, ENTITYLIST_SHAPE, GENERIC_THING_TEMPLATE, NON_PROPERTY_BASED_EVENTS, PROPERTY_EVENTS, TYPE_THING
-
Fields inherited from class com.thingworx.entities.RootEntity
BASIC_PROPERTY_DEFINITIONS, EXCLUDED_ENTITY_TYPES_IN_PROJECT
-
Fields inherited from class com.thingworx.types.NamedObject
NAME_COMPARATOR
-
-
Constructor Summary
Constructors Constructor Description FileRepositoryThing()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
AppendToBinaryFile(java.lang.String path, byte[] data)
void
AppendToTextFile(java.lang.String path, java.lang.String data)
Service Category: Files Service Description: Append to a text file.InfoTable
BrowseDirectory(java.lang.String path)
Service Category: Transfers Service Description: Get a list of files and/or directories on the Edge Thing.InfoTable
BrowseFileSystem(java.lang.String path)
Service Category: Files Service Description: Browse file system for directories and files.void
CancelFileTransfer(InfoTable job)
void
CompleteFileTransfer(InfoTable job)
java.lang.String
computeChecksum(java.lang.String path)
Deprecated.java.lang.String
computeChecksum(java.lang.String path, java.lang.String checksumAlgorithm)
java.lang.Boolean
CreateArchive(java.lang.String newFileName, java.lang.String path, java.lang.String compressionType, java.lang.String files)
Service Category: Compression Service Description: Create an archive/compressed file within this File Repository.void
CreateBinaryFile(java.lang.String path, byte[] data, java.lang.Boolean overwrite)
java.lang.Boolean
CreateFolder(java.lang.String path)
Service Category: Directories Service Description: Create a folder.java.lang.Boolean
CreateFolderInParent(java.lang.String parentFolderPath, java.lang.String folderName)
Service Category: Directories Service Description: Create a folder in a specific location.void
CreateTextFile(java.lang.String path, java.lang.String data, java.lang.Boolean overwrite)
Service Category: Files Service Description: Create a text file.java.lang.Boolean
CreateZipArchive(java.lang.String newFileName, java.lang.String path, java.lang.String files)
Service Category: Compression Service Description: Create a zip file archive within this File Repository.java.lang.Boolean
DeleteFile(java.lang.String path)
Service Category: Files Service Description: Delete a file.java.lang.Boolean
DeleteFolder(java.lang.String path)
Service Category: Directories Service Description: Delete a folder.java.lang.Boolean
ExtractArchive(java.lang.String archiveFileName, java.lang.String path, java.lang.String compressionType)
Service Category: Compression Service Description: Extract the contents of an archive within this File Repository.java.lang.Boolean
ExtractZipArchive(java.lang.String zipFileName, java.lang.String path)
Service Category: Compression Service Description: Extract the contents of a zip file archive within this File Repository.java.lang.Boolean
FlatExtractArchive(java.lang.String archiveFileName, java.lang.String path, java.lang.String compressionType)
Service Category: Services Service Description: Extract all contents of an archive into the specified path within this File Repository.InfoTable
GetDataExportListing(java.lang.String path)
Service Category: Exports Service Description: Lists exported data directories on the given path.InfoTable
GetDirectoryStructure()
Service Category: Directories Service Description: Get directory structure.InfoTable
GetEntityExportListing(java.lang.String path)
Service Category: Exports Service Description: Lists exported entity files on the given path.java.lang.String
GetFileChecksum(java.lang.String path)
Deprecated.java.lang.String
GetFileChecksum(java.lang.String path, java.lang.String checksumAlgorithm)
Gets the checksum of a file in this repository, using the cryptographic algorithm whose name was passed into the service as an argument.InfoTable
GetFileInfo(java.lang.String path)
Service Category: Files Service Description: Get file info.InfoTable
GetFileListing(java.lang.String path, java.lang.String nameMask)
Service Category: Files Service Description: Get file system listing.InfoTable
GetFileListingWithLinks(java.lang.String path, java.lang.String nameMask)
Service Category: Files Service Description: Get file system listing with download links.java.lang.Long
getFileSize(java.lang.String path)
java.lang.String
getRootPath()
InfoTable
GetSupportedFileChecksumAlgorithms()
InfoTable
GetTransferInfo()
InfoTable
ListDirectories(java.lang.String path, java.lang.String nameMask)
Service Category: Transfers Service Description: Get list of directories.InfoTable
ListFiles(java.lang.String path, java.lang.String nameMask)
Service Category: Transfers Service Description: Get file system listing.byte[]
LoadBinary(java.lang.String path)
Service Category: Files Service Description: Load binary content from a file.byte[]
LoadImage(java.lang.String path)
Service Category: Files Service Description: Load image content from a file.org.json.JSONObject
LoadJSON(java.lang.String path)
Service Category: Files Service Description: Load JSON from a file.java.lang.String
LoadText(java.lang.String path)
Service Category: Files Service Description: Load Text from a file.org.w3c.dom.Document
LoadXML(java.lang.String path)
Service Category: Files Service Description: Load XML from a file.void
MoveFile(java.lang.String sourcePath, java.lang.String targetPath, java.lang.Boolean overwrite)
Service Category: Files Service Description: Move a file.java.io.FileInputStream
openFileForRead(java.lang.String path)
java.io.FileOutputStream
openFileForWrite(java.lang.String path, FileRepositoryThing.FileMode mode)
InfoTable
ReadFromBinaryFile(java.lang.String path, java.lang.Double offset, java.lang.Integer count)
void
RenameFile(java.lang.String path, java.lang.String name, java.lang.Boolean overwrite)
Service Category: Files Service Description: Rename a file.java.lang.Boolean
SaveBinary(java.lang.String path, byte[] content)
Service Category: Files Service Description: Save binary data to a file.java.lang.Boolean
SaveImage(java.lang.String path, byte[] content)
Service Category: Files Service Description: Save image data to a file.java.lang.Boolean
SaveJSON(java.lang.String path, org.json.JSONObject content)
Service Category: Files Service Description: Save JSON to a file.java.lang.Boolean
SaveText(java.lang.String path, java.lang.String content)
Service Category: Files Service Description: Save text to a file.java.lang.Boolean
SaveXML(java.lang.String path, org.w3c.dom.Document content)
Service Category: Files Service Description: Save XML to a file.void
StartFileTransfer(java.lang.String tid, java.lang.String path, java.lang.String mode)
void
WriteToBinaryFile(java.lang.String path, java.lang.Double offset, byte[] data)
void
WriteToTextFile(java.lang.String path, java.lang.Double offset, java.lang.String data)
Service Category: Files Service Description: Write to a text file.-
Methods inherited from class com.thingworx.things.Thing
AcknowledgeAlert, acknowledgeAlertByProperty, acknowledgeAlertByPropertyAndName, acknowledgeAllAlerts, AcknowledgeAllAlerts, AddBooleanValueStreamEntry, AddBooleanValueStreamEntry, AddDateTimeValueStreamEntry, AddDateTimeValueStreamEntry, AddDynamicSubscription, AddEventDefinition, AddImageValueStreamEntry, AddImageValueStreamEntry, AddInfoTableValueStreamEntry, AddInfoTableValueStreamEntry, AddIntegerValueStreamEntry, AddIntegerValueStreamEntry, AddLocationValueStreamEntry, AddLocationValueStreamEntry, AddLongValueStreamEntry, AddLongValueStreamEntry, AddNumberValueStreamEntry, AddNumberValueStreamEntry, AddOrUpdateAlert, addProperty, AddPropertyDefinition, AddPropertyDefinition, AddPropertyDefinition, AddPropertyDefinition, AddPropertyDefinitions, AddPropertyTransformDefinition, AddServiceDefinition, AddServiceDefinition, AddStringValueStreamEntry, AddStringValueStreamEntry, AddTags, AddThingCodeValueStreamEntry, AddThingCodeValueStreamEntry, AddVec2ValueStreamEntry, AddVec2ValueStreamEntry, AddVec3ValueStreamEntry, AddVec3ValueStreamEntry, AddVec4ValueStreamEntry, AddVec4ValueStreamEntry, checkDemandRead, checkPropertyName, checkValueStream, cleanupThing, DisableAlertsForProperty, DisableAllAlerts, DisableSubscription, DisableSubscription, DisableThing, dispatchBackgroundEvent, dispatchEvent, dispose, EnableAlertsForProperty, EnableAllAlerts, EnableSubscription, EnableSubscription, EnableThing, fireEvent, getAlertConfigurations, GetAlertDefinition, GetAlertDefinitions, getAlerts, getAlertsForProperty, GetAlertStatus, GetAlertStatuses, GetAlertStatusesForProperty, GetAlertSummary, GetAlertSummaryForProperty, GetAllAnomalyAlertTrainingStatistics, getAllImplementedThingShapes, getAllImplementedThingTemplates, GetAnomalyAlertTrainingStatisticsForAlert, GetAnomalyAlertTrainingStatisticsForProperty, GetAvatar, GetBooleanAlertParameter, GetBooleanPropertyValue, GetDateTimeAlertParameter, GetDateTimePropertyValue, getDependencies, getEffectiveAlertConfiguration, getEffectiveAlertDefinition, getEffectiveEventDefinition, getEffectiveIdentifier, GetEffectiveLocalPropertyBinding, getEffectiveLocalPropertyBindings, GetEffectiveLocalPropertyBindings, getEffectivePropertyDefinition, GetEffectivePropertyLogging, getEffectiveRemoteEventBindings, getEffectiveRemotePropertyBindings, getEffectiveRemoteServiceBindings, getEffectiveServiceDefinition, getEffectiveValueStreamName, getEntityType, GetHomeMashup, getIdentifier, GetIdentifier, GetImagePropertyValue, GetImplementedShapes, getImplementedThingTemplates, GetIncomingLocalPropertyBinding, GetIncomingLocalPropertyBindings, getInstanceEventDefinition, getInstanceEventDefinitions, getInstanceMultiEventSubscriptions, getInstancePropertyDefinition, getInstancePropertyDefinitionIfVisible, getInstancePropertyDefinitions, getInstancePublicServiceDefinitions, getInstanceServiceDefinition, getInstanceServiceDefinitions, getInstanceShape, getInstanceSubscriptions, GetIntegerAlertParameter, GetIntegerPropertyValue, GetLocalAlertDefinitions, GetLocallyImplementedShapes, GetLocalPropertyBinding, GetLocationAlertParameter, GetLocationPropertyValue, GetLoggedProperties, GetLongAlertParameter, GetLongPropertyValue, GetMashups, GetNamedProperties, GetNamedPropertyValues, GetNamedPropertyValuesVTQ, GetNamedPropertyValuesVTQA, GetNetworks, GetNumberAlertParameter, GetNumberPropertyValue, GetNumericLoggedProperties, getProperties, getProperty, getPropertyAckStatus, getPropertyAlertStatus, GetPropertyLogging, getPropertyQuality, GetPropertyQuality, getPropertyTime, GetPropertyTime, getPropertyType, getPropertyValue, getPropertyValue, getPropertyValues, GetPropertyValues, getPropertyValuesAsInfoTable, GetPropertyValuesAsMultiRowTable, GetPropertyValuesVTQ, GetPropertyValuesVTQA, GetPublished, GetRemoteEventBinding, GetRemotePropertyBinding, GetRemoteServiceBinding, getState, GetStringAlertParameter, GetStringPropertyValue, GetThingCodePropertyValue, GetThingGroupDelegatedVisibilityPermissions, GetThingRelationships, GetThingSummaryInformation, getThingTemplate, GetThingTemplate, getThingTemplateName, GetValueStream, getValueStreamName, GetVec2PropertyValue, GetVec3PropertyValue, GetVec4PropertyValue, HasAlert, hasEventDefinition, hasLocalEventDefinition, hasLocalPropertyDefinition, hasLocalServiceDefinition, hasProperty, hasPropertyAndIsVisible, hasPropertyDefinition, hasServiceDefinition, HavePropertiesChangedSince, implementsShape, ImplementsShape, implementsTemplate, initializeEntity, initializeProperty, initializeThing, isAlwaysAvailableService, isBuiltInEvent, isBuiltInProperty, IsDerivedFromTemplate, IsDynamicSubscriptionCreated, isEnabled, IsEnabled, isEventRemote, isExternallySubscribed, IsInNetwork, isLocallySubscribed, isLocalProperty, isPropertyEvent, isPropertyRemote, isPublished, isRunning, isServiceRemote, isSubscribed, preprocessSetPropertyVTQ, processAPIServiceRequest, processServiceRequest, processStartNotification, PurgeAllPropertyHistory, PurgePropertyHistory, PurgeSelectedPropertyHistory, QueryAlertHistory, QueryAlertSummary, QueryBooleanPropertyHistory, QueryBooleanPropertyHistory, QueryDateTimePropertyHistory, QueryDateTimePropertyHistory, QueryImagePropertyHistory, QueryImagePropertyHistory, QueryInfoTablePropertyHistory, QueryInfoTablePropertyHistory, QueryIntegerPropertyHistory, QueryIntegerPropertyHistory, QueryLocationPropertyHistory, QueryLocationPropertyHistory, QueryLongPropertyHistory, QueryLongPropertyHistory, QueryNamedPropertyHistory, QueryNamedPropertyHistory, QueryNamedPropertyHistory, QueryNumberPropertyHistory, QueryNumberPropertyHistory, QueryPropertyHistory, QueryPropertyHistory, QueryPropertyHistory, QueryStringPropertyHistory, QueryStringPropertyHistory, QueryThingCodePropertyHistory, QueryThingCodePropertyHistory, QueryVec2PropertyHistory, QueryVec2PropertyHistory, QueryVec3PropertyHistory, QueryVec3PropertyHistory, QueryVec4PropertyHistory, QueryVec4PropertyHistory, QueuePostCommitEvent, RemoveAlert, RemoveDynamicSubscription, RemoveEventDefinition, RemoveLocalPropertyBinding, RemovePropertyDefinition, RemoveRemoteEventBinding, RemoveRemotePropertyBinding, RemoveRemoteServiceBinding, RemoveServiceDefinition, RestartThing, SetBooleanAlertParameter, SetDateTimeAlertParameter, SetDescription, SetIdentifier, SetIntegerAlertParameter, SetLocalPropertyBinding, SetLocalPropertyBinding, SetLocationAlertParameter, SetNumberAlertParameter, SetPropertyLogging, setPropertyValue, SetPropertyValues, setPropertyVTQ, setPropertyVTQ, SetPublished, SetRemoteEventBinding, SetRemotePropertyBinding, SetRemotePropertyBinding, SetRemoteServiceBinding, SetStringAlertParameter, SetTags, setThingTemplateName, SetUnitsForNumericPropertyDefinition, SetValueStream, startThing, stopThing, UpdatePropertyValues, UpdatePropertyValuesBatched, validateConfiguration, WritePropertiesToStream
-
Methods inherited from class com.thingworx.entities.RootEntity
AddConfigurationTableDefinition, AddConfigurationTableDefinition, addDesignTimePermission, AddDesignTimePermission, addRunTimePermission, AddRunTimePermission, addVisibilityPermission, AddVisibilityPermission, CheckDesignTimePermission, CheckDesignTimePermissionForGroup, CheckDesignTimePermissionForUser, CheckPermission, CheckPermissionForGroup, CheckPermissionForUser, cleanupEntity, DeleteAllConfigurationTableRows, DeleteConfigurationTable, DeleteConfigurationTableRows, DeleteConfigurationTableRows, deleteDesignTimePermission, DeleteDesignTimePermission, deleteRunTimePermission, DeleteRunTimePermission, deleteVisibilityPermission, DeleteVisibilityPermission, getAspects, getAvatarContent, GetAvatarURL, GetConfigurationChangeHistory, getConfigurationSetting, getConfigurationTable, GetConfigurationTable, GetConfigurationTableDefinition, GetConfigurationTableRow, GetConfigurationTables, GetDescription, getDesignTimePermissions, GetDesignTimePermissions, GetDesignTimePermissionsAsJSON, getDocumentationContent, getEntityTypeAsString, GetEventDefinition, GetEventDefinitions, GetIncomingDependencies, GetIncomingDependenciesAsNetwork, GetInstanceMetadataAsJSON, GetInstanceMetadataWithPermissionsAsJSON, GetLastModifiedDate, GetMetadata, GetMetadataAsJSON, GetMetadataWithPermissionsAsJSON, GetOutgoingDependencies, GetOutgoingDependenciesAsNetwork, getOwner, GetOwner, GetPermissionsForCurrentUser, GetPermissionsForGroup, GetPermissionsForUser, GetProjectName, GetPropertyDefinition, GetPropertyDefinitions, getRunTimePermissions, GetRunTimePermissions, GetRunTimePermissionsAsJSON, GetServiceDefinition, GetServiceDefinitions, getStringConfigurationSetting, getStringConfigurationSettingWithDefault, GetSummaryInformation, getTags, GetTags, GetTagsAsInfoTable, getVisibilityPermissions, GetVisibilityPermissions, GetVisibilityPermissionsAsJSON, HasIncomingDependencies, HasOutgoingDependencies, isEditable, isEditableExtensionObject, isEditableSystemObject, isExtensionObject, IsMultiRowTable, isOwner, isSystemObject, isThemeObject, isVisible, isVisible, ListDeprecatedUsage, persistDesignTimePermissions, persistRunTimePermissions, persistVisibilityPermissions, preInitializeEntity, RemoveTags, SaveConfigurationTables, SetAvatar, setConfigurationSetting, SetConfigurationTable, SetConfigurationTableRows, setDesignTimePermissions, SetDesignTimePermissionsAsJSON, setDocumentationContent, setExtensionObject, SetHomeMashup, setLastModifiedDate, SetMultiRowConfigurationTable, setOwner, SetOwner, SetProjectName, setRunTimePermissions, SetRunTimePermissionsAsJSON, setStringConfigurationSetting, setVisibilityPermissions, SetVisibilityPermissionsAsJSON, toJSON, toJSONDefinition, UpdateProjectDependencies
-
Methods inherited from class com.thingworx.persistence.common.PersistableNamedObject
getID, hasID, isTransient
-
Methods inherited from class com.thingworx.types.NamedObject
getDescription, getName, setDescription, setName, toValueCollection
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.thingworx.types.INamedObject
getDescription
-
Methods inherited from interface com.thingworx.entities.interfaces.IPersistable
getID, hasID
-
Methods inherited from interface com.thingworx.security.permissions.ISecurable
getID, getName
-
Methods inherited from interface com.thingworx.entities.interfaces.IShapeProvider
getName
-
Methods inherited from interface com.thingworx.accesscontrol.ISupportsAccessModifier
getAccessModifier, getAccessModifierScope, getExemptList, hasAccessModifier, isInternalAccess, isPrivateAccess, isRestrictedAccess
-
Methods inherited from interface com.thingworx.deprecation.ISupportsDeprecation
getDeprecated, isDeprecated, isDeprecatedBefore, since
-
-
-
-
Field Detail
-
DIRECTORY_DATASHAPE
public static final java.lang.String DIRECTORY_DATASHAPE
- See Also:
- Constant Field Values
-
FILE_DATASHAPE
public static final java.lang.String FILE_DATASHAPE
- See Also:
- Constant Field Values
-
FILE_DATASHAPE_WITH_LINKS
public static final java.lang.String FILE_DATASHAPE_WITH_LINKS
- See Also:
- Constant Field Values
-
IBM_ENCODING
public static final java.lang.String IBM_ENCODING
- See Also:
- Constant Field Values
-
BUFFER_SIZE
public static final int BUFFER_SIZE
- See Also:
- Constant Field Values
-
DEFAULT_TRANSFER_BLOCK_SIZE
public static final double DEFAULT_TRANSFER_BLOCK_SIZE
- See Also:
- Constant Field Values
-
DEFAULT_MAX_FILE_SIZE
public static final double DEFAULT_MAX_FILE_SIZE
- See Also:
- Constant Field Values
-
-
Method Detail
-
GetDirectoryStructure
@ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetDirectoryStructure() throws java.lang.Exception
- Service Category:
- Directories
- Service Description:
- Get directory structure.
- Returns:
- result Directory Results - INFOTABLE - Aspects {dataShape:FileSystemDirectory}
- Throws:
java.lang.Exception
- If an error occurs
-
GetTransferInfo
@ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetTransferInfo() throws java.lang.Exception
- Returns:
- result File Results - INFOTABLE - Aspects {dataShape:GetTransferInfoResult}
- Throws:
java.lang.Exception
- If an error occurs
-
GetFileInfo
@ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetFileInfo(java.lang.String path) throws java.lang.Exception
- Service Category:
- Files
- Service Description:
- Get file info.
- Parameters:
path
- File path - STRING- Returns:
- result File Results - INFOTABLE - Aspects {dataShape:FileSystemFile}
- Throws:
java.lang.Exception
- If an error occurs
-
GetFileChecksum
@Deprecated @ThingworxExtensionApiMethod(since={6,6}, deprecatedSince={8,4,0}) public java.lang.String GetFileChecksum(java.lang.String path) throws java.lang.Exception
Deprecated.- Throws:
java.lang.Exception
- If an error occurs
-
GetFileChecksum
@ThingworxExtensionApiMethod(since={8,4}) public java.lang.String GetFileChecksum(java.lang.String path, java.lang.String checksumAlgorithm) throws java.lang.Exception
Gets the checksum of a file in this repository, using the cryptographic algorithm whose name was passed into the service as an argument. Supported checksum algorithms can be gotten using the GetSupportedChecksumAlgorithms service.- Parameters:
path
- The path to the file to conduct a checksum onchecksumAlgorithm
- The name of the checksum algorithm to use- Returns:
- The checksum of the indicated file
- Throws:
java.lang.Exception
- Thrown if the cryptographic algorithm provided is invalid or is not recognized by the server
-
GetSupportedFileChecksumAlgorithms
@ThingworxExtensionApiMethod(since={8,4}) public InfoTable GetSupportedFileChecksumAlgorithms() throws java.lang.Exception
- Returns:
- result The checksum of the file using the given algorithm - INFOTABLE - Aspects {dataShape:ChecksumAlgorithmList}
- Throws:
java.lang.Exception
- If an error occurs
-
GetFileListing
@ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetFileListing(java.lang.String path, java.lang.String nameMask) throws java.lang.Exception
- Service Category:
- Files
- Service Description:
- Get file system listing.
- Parameters:
path
- Directory path - STRINGnameMask
- Name mask - STRING- Returns:
- result File Results - INFOTABLE - Aspects {dataShape:FileSystemFile}
- Throws:
java.lang.Exception
- If an error occurs
-
ListFiles
@ThingworxExtensionApiMethod(since={6,6}) public InfoTable ListFiles(java.lang.String path, java.lang.String nameMask) throws java.lang.Exception
- Service Category:
- Transfers
- Service Description:
- Get file system listing.
- Parameters:
path
- Directory path - STRINGnameMask
- Name mask - STRING- Returns:
- result File Results - INFOTABLE - Aspects {dataShape:FileSystemFile}
- Throws:
java.lang.Exception
- If an error occurs
-
ListDirectories
@ThingworxExtensionApiMethod(since={6,6}) public InfoTable ListDirectories(java.lang.String path, java.lang.String nameMask) throws java.lang.Exception
- Service Category:
- Transfers
- Service Description:
- Get list of directories.
- Parameters:
path
- Directory path - STRINGnameMask
- Name mask - STRING- Returns:
- result Directory Results - INFOTABLE - Aspects {dataShape:FileSystemDirectory}
- Throws:
java.lang.Exception
- If an error occurs
-
BrowseFileSystem
@ThingworxExtensionApiMethod(since={6,6}) public InfoTable BrowseFileSystem(java.lang.String path) throws java.lang.Exception
- Service Category:
- Files
- Service Description:
- Browse file system for directories and files.
- Parameters:
path
- Directory path - STRING- Returns:
- result File Results - INFOTABLE - Aspects {dataShape:FileSystemFile}
- Throws:
java.lang.Exception
- If an error occurs
-
BrowseDirectory
@ThingworxExtensionApiMethod(since={6,6}) public InfoTable BrowseDirectory(java.lang.String path) throws java.lang.Exception
- Service Category:
- Transfers
- Service Description:
- Get a list of files and/or directories on the Edge Thing.
- Parameters:
path
- Directory path - STRING- Returns:
- result Browse Results - INFOTABLE - Aspects {dataShape:FileSystemFile}
- Throws:
java.lang.Exception
- If an error occurs
-
GetFileListingWithLinks
@ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetFileListingWithLinks(java.lang.String path, java.lang.String nameMask) throws java.lang.Exception
- Service Category:
- Files
- Service Description:
- Get file system listing with download links.
- Parameters:
path
- Directory path - STRINGnameMask
- Name mask - STRING- Returns:
- result File Results - INFOTABLE - Aspects {dataShape:FileSystemFileWithLinks}
- Throws:
java.lang.Exception
- If an error occurs
-
StartFileTransfer
@ThingworxExtensionApiMethod(since={6,6}) public void StartFileTransfer(java.lang.String tid, java.lang.String path, java.lang.String mode) throws java.lang.Exception
- Parameters:
tid
- Transfer Id - STRINGpath
- File path - STRINGmode
- Indicates if the file will be open in 'read' or 'write' mode - STRING- Throws:
java.lang.Exception
- If an error occurs
-
CompleteFileTransfer
@ThingworxExtensionApiMethod(since={6,6}) public void CompleteFileTransfer(InfoTable job) throws java.lang.Exception
- Parameters:
job
- The transfer job being completed - INFOTABLE- Throws:
java.lang.Exception
- If an error occurs
-
CancelFileTransfer
@ThingworxExtensionApiMethod(since={6,6}) public void CancelFileTransfer(InfoTable job) throws java.lang.Exception
- Parameters:
job
- The transfer job being completed - INFOTABLE- Throws:
java.lang.Exception
- If an error occurs
-
CreateBinaryFile
@ThingworxExtensionApiMethod(since={6,6}) public void CreateBinaryFile(java.lang.String path, byte[] data, java.lang.Boolean overwrite) throws java.lang.Exception
- Parameters:
path
- File path - STRINGdata
- Initial data - BLOBoverwrite
- Overwrite existing file - BOOLEAN- Throws:
java.lang.Exception
- If an error occurs
-
CreateTextFile
@ThingworxExtensionApiMethod(since={6,6}) public void CreateTextFile(java.lang.String path, java.lang.String data, java.lang.Boolean overwrite) throws java.lang.Exception
- Service Category:
- Files
- Service Description:
- Create a text file.
- Parameters:
path
- File path - STRINGdata
- Initial data - STRINGoverwrite
- Overwrite existing file - BOOLEAN- Throws:
java.lang.Exception
- If an error occurs
-
ReadFromBinaryFile
@ThingworxExtensionApiMethod(since={6,6}) public InfoTable ReadFromBinaryFile(java.lang.String path, java.lang.Double offset, java.lang.Integer count) throws java.lang.Exception
- Parameters:
path
- File path - STRINGoffset
- File offset in bytes - NUMBERcount
- Number of bytes to read - INTEGER- Returns:
- result File Read Results - INFOTABLE - Aspects {dataShape:ReadFromBinaryFileResult}
- Throws:
java.lang.Exception
- If an error occurs
-
AppendToBinaryFile
@ThingworxExtensionApiMethod(since={6,6}) public void AppendToBinaryFile(java.lang.String path, byte[] data) throws java.lang.Exception
- Parameters:
path
- File path - STRINGdata
- Initial data - BLOB- Throws:
java.lang.Exception
- If an error occurs
-
WriteToBinaryFile
@ThingworxExtensionApiMethod(since={6,6}) public void WriteToBinaryFile(java.lang.String path, java.lang.Double offset, byte[] data) throws java.lang.Exception
- Parameters:
path
- File path - STRINGoffset
- File offset in bytes - NUMBERdata
- Initial data - BLOB- Throws:
java.lang.Exception
- If an error occurs
-
WriteToTextFile
@ThingworxExtensionApiMethod(since={6,6}) public void WriteToTextFile(java.lang.String path, java.lang.Double offset, java.lang.String data) throws java.lang.Exception
- Service Category:
- Files
- Service Description:
- Write to a text file.
- Parameters:
path
- File path - STRINGoffset
- File offset in bytes - NUMBERdata
- Initial data - STRING- Throws:
java.lang.Exception
- If an error occurs
-
AppendToTextFile
@ThingworxExtensionApiMethod(since={6,6}) public void AppendToTextFile(java.lang.String path, java.lang.String data) throws java.lang.Exception
- Service Category:
- Files
- Service Description:
- Append to a text file.
- Parameters:
path
- File path - STRINGdata
- Initial data - STRING- Throws:
java.lang.Exception
- If an error occurs
-
RenameFile
@ThingworxExtensionApiMethod(since={6,6}) public void RenameFile(java.lang.String path, java.lang.String name, java.lang.Boolean overwrite) throws java.lang.Exception
- Service Category:
- Files
- Service Description:
- Rename a file.
- Parameters:
path
- File path - STRINGname
- New file name - STRINGoverwrite
- Overwrite existing file - BOOLEAN- Throws:
java.lang.Exception
- If an error occurs
-
MoveFile
@ThingworxExtensionApiMethod(since={6,6}) public void MoveFile(java.lang.String sourcePath, java.lang.String targetPath, java.lang.Boolean overwrite) throws java.lang.Exception
- Service Category:
- Files
- Service Description:
- Move a file.
- Parameters:
sourcePath
- Path of file to move - STRINGtargetPath
- Path of target file - STRINGoverwrite
- Overwrite existing file - BOOLEAN- Throws:
java.lang.Exception
- If an error occurs
-
DeleteFile
@ThingworxExtensionApiMethod(since={6,6}) public java.lang.Boolean DeleteFile(java.lang.String path) throws java.lang.Exception
- Service Category:
- Files
- Service Description:
- Delete a file.
- Parameters:
path
- File path - STRING- Throws:
java.lang.Exception
- If an error occurs
-
CreateFolderInParent
@ThingworxExtensionApiMethod(since={6,6}) public java.lang.Boolean CreateFolderInParent(java.lang.String parentFolderPath, java.lang.String folderName) throws java.lang.Exception
- Service Category:
- Directories
- Service Description:
- Create a folder in a specific location.
- Parameters:
parentFolderPath
- Parent folder full path - STRINGfolderName
- New Folder to be created - STRING- Throws:
java.lang.Exception
- If an error occurs
-
CreateFolder
@ThingworxExtensionApiMethod(since={6,6}) public java.lang.Boolean CreateFolder(java.lang.String path) throws java.lang.Exception
- Service Category:
- Directories
- Service Description:
- Create a folder.
- Parameters:
path
- Folder path - STRING- Throws:
java.lang.Exception
- If an error occurs
-
DeleteFolder
@ThingworxExtensionApiMethod(since={6,6}) public java.lang.Boolean DeleteFolder(java.lang.String path) throws java.lang.Exception
- Service Category:
- Directories
- Service Description:
- Delete a folder.
- Parameters:
path
- Folder path - STRING- Throws:
java.lang.Exception
- If an error occurs
-
SaveJSON
@ThingworxExtensionApiMethod(since={6,6}) public java.lang.Boolean SaveJSON(java.lang.String path, org.json.JSONObject content) throws java.lang.Exception
- Service Category:
- Files
- Service Description:
- Save JSON to a file.
- Parameters:
path
- File path - STRINGcontent
- JSON content - JSON- Throws:
java.lang.Exception
- If an error occurs
-
LoadJSON
@ThingworxExtensionApiMethod(since={6,6}) public org.json.JSONObject LoadJSON(java.lang.String path) throws java.lang.Exception
- Service Category:
- Files
- Service Description:
- Load JSON from a file.
- Parameters:
path
- File path - STRING- Returns:
- Content Content - JSON
- Throws:
java.lang.Exception
- If an error occurs
-
SaveXML
@ThingworxExtensionApiMethod(since={6,6}) public java.lang.Boolean SaveXML(java.lang.String path, org.w3c.dom.Document content) throws java.lang.Exception
- Service Category:
- Files
- Service Description:
- Save XML to a file.
- Parameters:
path
- File path - STRINGcontent
- XML content - XML- Throws:
java.lang.Exception
- If an error occurs
-
LoadXML
@ThingworxExtensionApiMethod(since={6,6}) public org.w3c.dom.Document LoadXML(java.lang.String path) throws java.lang.Exception
- Service Category:
- Files
- Service Description:
- Load XML from a file.
- Parameters:
path
- File path - STRING- Returns:
- Content Content - XML
- Throws:
java.lang.Exception
- If an error occurs
-
SaveText
@ThingworxExtensionApiMethod(since={6,6}) public java.lang.Boolean SaveText(java.lang.String path, java.lang.String content) throws java.lang.Exception
- Service Category:
- Files
- Service Description:
- Save text to a file.
- Parameters:
path
- File path - STRINGcontent
- Text content - STRING- Throws:
java.lang.Exception
- If an error occurs
-
LoadText
@ThingworxExtensionApiMethod(since={6,6}) public java.lang.String LoadText(java.lang.String path) throws java.lang.Exception
- Service Category:
- Files
- Service Description:
- Load Text from a file.
- Parameters:
path
- File path - STRING- Returns:
- Content Content - STRING
- Throws:
java.lang.Exception
- If an error occurs
-
SaveBinary
@ThingworxExtensionApiMethod(since={6,6}) public java.lang.Boolean SaveBinary(java.lang.String path, byte[] content) throws java.lang.Exception
- Service Category:
- Files
- Service Description:
- Save binary data to a file.
- Parameters:
path
- File path - STRINGcontent
- Binary content - BLOB- Throws:
java.lang.Exception
- If an error occurs
-
LoadBinary
@ThingworxExtensionApiMethod(since={6,6}) public byte[] LoadBinary(java.lang.String path) throws java.lang.Exception
- Service Category:
- Files
- Service Description:
- Load binary content from a file.
- Parameters:
path
- File path - STRING- Returns:
- Content Content - BLOB
- Throws:
java.lang.Exception
- If an error occurs
-
SaveImage
@ThingworxExtensionApiMethod(since={6,6}) public java.lang.Boolean SaveImage(java.lang.String path, byte[] content) throws java.lang.Exception
- Service Category:
- Files
- Service Description:
- Save image data to a file.
- Parameters:
path
- File path - STRINGcontent
- Binary content - IMAGE- Throws:
java.lang.Exception
- If an error occurs
-
LoadImage
@ThingworxExtensionApiMethod(since={6,6}) public byte[] LoadImage(java.lang.String path) throws java.lang.Exception
- Service Category:
- Files
- Service Description:
- Load image content from a file.
- Parameters:
path
- File path - STRING- Returns:
- Content Content - IMAGE
- Throws:
java.lang.Exception
- If an error occurs
-
CreateZipArchive
@ThingworxExtensionApiMethod(since={6,6}) public java.lang.Boolean CreateZipArchive(java.lang.String newFileName, java.lang.String path, java.lang.String files) throws java.lang.Exception
- Service Category:
- Compression
- Service Description:
- Create a zip file archive within this File Repository. If specified path does not exist, it will be created inside the File Repository.
- Parameters:
newFileName
- Name of zip file to be created - STRINGpath
- Path within the File Repository to create the zip file - STRINGfiles
- Comma separated list of full path names for files in the repository to add to the archive - STRING- Returns:
- result success or failure of the archive creation - BOOLEAN
- Throws:
java.lang.Exception
- If an error occurs
-
CreateArchive
@ThingworxExtensionApiMethod(since={7,3}) public java.lang.Boolean CreateArchive(java.lang.String newFileName, java.lang.String path, java.lang.String compressionType, java.lang.String files) throws java.lang.Exception
- Service Category:
- Compression
- Service Description:
- Create an archive/compressed file within this File Repository. If specified path does not exist, it will be created inside the File Repository.
- Parameters:
newFileName
- Name of file to be created - STRINGpath
- Path within the File Repository to create the file - STRINGcompressionType
- Compression type of archive file (valid types are zip and targz). If not provided, it will default to 'zip' - STRINGfiles
- Comma separated list of full path names for files in the repository to add to the archive - STRING- Returns:
- result success or failure of the archive creation - BOOLEAN
- Throws:
java.lang.Exception
- If an error occurs
-
ExtractZipArchive
@ThingworxExtensionApiMethod(since={6,6}) public java.lang.Boolean ExtractZipArchive(java.lang.String zipFileName, java.lang.String path) throws java.lang.Exception
- Service Category:
- Compression
- Service Description:
- Extract the contents of a zip file archive within this File Repository. If specified path does not exist, it will be created.
- Parameters:
zipFileName
- Full path of zip file within the File Repository - STRINGpath
- Path within the File Repository to extract the zip file contents to - STRING- Returns:
- result success or failure of the extraction - BOOLEAN
- Throws:
java.lang.Exception
- If an error occurs
-
ExtractArchive
@ThingworxExtensionApiMethod(since={7,3}) public java.lang.Boolean ExtractArchive(java.lang.String archiveFileName, java.lang.String path, java.lang.String compressionType) throws java.lang.Exception
- Service Category:
- Compression
- Service Description:
- Extract the contents of an archive within this File Repository. If specified path does not exist, it will be created.
- Parameters:
archiveFileName
- Full path of archive file within the File Repository - STRINGpath
- Path within the File Repository to extract the archive file contents to - STRINGcompressionType
- Compression type of archive file (valid types are zip and targz). If not provided, it will be derived from newFileName if possible - STRING- Returns:
- result success or failure of the extraction - BOOLEAN
- Throws:
java.lang.Exception
- If an error occurs
-
FlatExtractArchive
@ThingworxExtensionApiMethod(since={8,5}) public java.lang.Boolean FlatExtractArchive(java.lang.String archiveFileName, java.lang.String path, java.lang.String compressionType) throws java.lang.Exception
- Service Category:
- Services
- Service Description:
- Extract all contents of an archive into the specified path within this File Repository. If the specified path does not exist, it will be created.
- Parameters:
archiveFileName
- Full path of archive file within the File Repository - STRINGpath
- Path within the File Repository to extract the archive file contents to - STRINGcompressionType
- Compression type of archive file (valid types are zip and targz). If not provided, it will be derived from newFileName if possible - STRING- Returns:
- result success or failure of the extraction - BOOLEAN
- Throws:
java.lang.Exception
- If an error occurs
-
getRootPath
@ThingworxExtensionApiMethod(since={6,6}) public java.lang.String getRootPath()
- Specified by:
getRootPath
in interfaceIRepository
-
getFileSize
@ThingworxExtensionApiMethod(since={6,6}) public java.lang.Long getFileSize(java.lang.String path)
-
computeChecksum
@Deprecated @ThingworxExtensionApiMethod(since={6,6}, deprecatedSince={8,4,0}) public java.lang.String computeChecksum(java.lang.String path) throws java.lang.Exception
Deprecated.- Throws:
java.lang.Exception
- If an error occurs
-
computeChecksum
@ThingworxExtensionApiMethod(since={8,4}) public java.lang.String computeChecksum(java.lang.String path, java.lang.String checksumAlgorithm) throws java.lang.Exception
- Throws:
java.lang.Exception
- If an error occurs
-
openFileForRead
@ThingworxExtensionApiMethod(since={6,6}) public java.io.FileInputStream openFileForRead(java.lang.String path) throws java.lang.Exception
- Throws:
java.lang.Exception
- If an error occurs
-
openFileForWrite
@ThingworxExtensionApiMethod(since={6,6}) public java.io.FileOutputStream openFileForWrite(java.lang.String path, FileRepositoryThing.FileMode mode) throws java.lang.Exception
- Throws:
java.lang.Exception
- If an error occurs
-
GetDataExportListing
@ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetDataExportListing(java.lang.String path) throws java.lang.Exception
- Service Category:
- Exports
- Service Description:
- Lists exported data directories on the given path.
- Parameters:
path
- File Repository Relative Path - STRING- Returns:
- result Returns lists of exported data directories on the given path - INFOTABLE - Aspects {dataShape:ExportFile}
- Throws:
java.lang.Exception
- If an error occurs
-
GetEntityExportListing
@ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetEntityExportListing(java.lang.String path) throws java.lang.Exception
- Service Category:
- Exports
- Service Description:
- Lists exported entity files on the given path.
- Parameters:
path
- File Repository Relative Path - STRING- Returns:
- result Returns list of exported entity files on the given path - INFOTABLE - Aspects {dataShape:ExportFile}
- Throws:
java.lang.Exception
- If an error occurs
-
-