Skip navigation links
Thingworx Platform API
8.5.0
com.thingworx.things.connected

Class RemoteThingWithTunnelsAndFileTransfer

    • Method Detail

      • IsDerivedFromTemplate

        @ThingworxExtensionApiMethod(since={7,4})
        public java.lang.Boolean IsDerivedFromTemplate(java.lang.String thingTemplateName)
                                                                                          throws java.lang.Exception
        Service Category:
        Metadata
        Service Description:
        Check to see if a thing is derived from a particular thing template.
        Overrides:
        IsDerivedFromTemplate in class RemoteThingWithTunnels
        Parameters:
        thingTemplateName - Thing template name - THINGTEMPLATENAME
        Returns:
        result Is Derived From Template - BOOLEAN
        Throws:
        java.lang.Exception - If an error occurs
      • StartFileTransfer

        @ThingworxExtensionApiMethod(since={7,4})
        public void StartFileTransfer(java.lang.String tid,
                                                                                java.lang.String path,
                                                                                java.lang.String mode)
                                                                         throws java.lang.Exception
        Parameters:
        tid - Transfer Id - STRING
        path - File path - STRING
        mode - Indicates if the file will be open in 'read' or 'write' mode - STRING
        Throws:
        java.lang.Exception - If an error occurs
      • CompleteFileTransfer

        @ThingworxExtensionApiMethod(since={7,4})
        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={7,4})
        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
      • GetTransferInfo

        @ThingworxExtensionApiMethod(since={7,4})
        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={7,4})
        public InfoTable GetFileInfo(java.lang.String path)
                                                                        throws java.lang.Exception
        Service Category:
        FileTransfer
        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
      • GetSupportedFileChecksumAlgorithms

        @ThingworxExtensionApiMethod(since={8,4})
        public InfoTable GetSupportedFileChecksumAlgorithms()
                                                                                               throws java.lang.Exception
        Returns:
        result List of cryptographic algorithms this Thing supports for file transfers - INFOTABLE - Aspects {dataShape:ChecksumAlgorithmList}
        Throws:
        java.lang.Exception - If an error occurs
      • GetFileChecksum

        @Deprecated
         @ThingworxExtensionApiMethod(since={7,4},
                                     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 on this RemoteThing, 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 on
        checksumAlgorithm - 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
      • BrowseFileSystem

        @ThingworxExtensionApiMethod(since={7,4})
        public InfoTable BrowseFileSystem(java.lang.String path)
                                                                             throws java.lang.Exception
        Service Category:
        FileTransfer
        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
      • BrowseDirectory

        @ThingworxExtensionApiMethod(since={7,4})
        public InfoTable BrowseDirectory(java.lang.String path)
                                                                            throws java.lang.Exception
        Service Category:
        FileTransfer
        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
      • GetFileListing

        @ThingworxExtensionApiMethod(since={7,4})
        public InfoTable GetFileListing(java.lang.String path,
                                                                                  java.lang.String nameMask)
                                                                           throws java.lang.Exception
        Service Category:
        FileTransfer
        Service Description:
        Get file system listing.
        Parameters:
        path - Directory path - STRING
        nameMask - Name mask - STRING
        Returns:
        result File Results - INFOTABLE - Aspects {dataShape:FileSystemFile}
        Throws:
        java.lang.Exception - If an error occurs
      • ListFiles

        @ThingworxExtensionApiMethod(since={7,4})
        public InfoTable ListFiles(java.lang.String path,
                                                                             java.lang.String nameMask)
                                                                      throws java.lang.Exception
        Service Category:
        FileTransfer
        Service Description:
        Get file system listing.
        Parameters:
        path - Directory path - STRING
        nameMask - Name mask - STRING
        Returns:
        result File Results - INFOTABLE - Aspects {dataShape:FileSystemFile}
        Throws:
        java.lang.Exception - If an error occurs
      • ListDirectories

        @ThingworxExtensionApiMethod(since={7,4})
        public InfoTable ListDirectories(java.lang.String path)
                                                                            throws java.lang.Exception
        Service Category:
        FileTransfer
        Service Description:
        Get listing of directories.
        Parameters:
        path - Directory path - STRING
        Returns:
        result File Results - INFOTABLE - Aspects {dataShape:FileSystemDirectory}
        Throws:
        java.lang.Exception - If an error occurs
      • CreateBinaryFile

        @ThingworxExtensionApiMethod(since={7,4})
        public void CreateBinaryFile(java.lang.String path,
                                                                               byte[] data,
                                                                               java.lang.Boolean overwrite)
                                                                        throws java.lang.Exception
        Parameters:
        path - File path - STRING
        data - The data to write to the file - BLOB
        overwrite - Overwrite the file if it already exists - BOOLEAN
        Throws:
        java.lang.Exception - If an error occurs
      • ReadFromBinaryFile

        @ThingworxExtensionApiMethod(since={7,4})
        public InfoTable ReadFromBinaryFile(java.lang.String path,
                                                                                      java.lang.Double offset,
                                                                                      java.lang.Integer count)
                                                                               throws java.lang.Exception
        Parameters:
        path - File path - STRING
        offset - File offset in bytes - NUMBER
        count - Number of bytes to read - INTEGER
        Returns:
        result File Read Results - INFOTABLE - Aspects {dataShape:ReadFromBinaryFileResult}
        Throws:
        java.lang.Exception - If an error occurs
      • WriteToBinaryFile

        @ThingworxExtensionApiMethod(since={7,4})
        public void WriteToBinaryFile(java.lang.String path,
                                                                                java.lang.Double offset,
                                                                                byte[] data)
                                                                         throws java.lang.Exception
        Parameters:
        path - File path - STRING
        offset - File offset in bytes - NUMBER
        data - Initial data - BLOB
        Throws:
        java.lang.Exception - If an error occurs
      • AppendToBinaryFile

        @ThingworxExtensionApiMethod(since={7,4})
        public void AppendToBinaryFile(java.lang.String path,
                                                                                 byte[] data)
                                                                          throws java.lang.Exception
        Parameters:
        path - File path - STRING
        data - Initial data - BLOB
        Throws:
        java.lang.Exception - If an error occurs
      • MoveFile

        @ThingworxExtensionApiMethod(since={7,4})
        public void MoveFile(java.lang.String sourcePath,
                                                                       java.lang.String targetPath,
                                                                       java.lang.Boolean overwrite)
                                                                throws java.lang.Exception
        Service Category:
        FileSystemServices
        Service Description:
        Move a file.
        Parameters:
        sourcePath - Path of file to move - STRING
        targetPath - Target path - STRING
        overwrite - Overwrite existing file - BOOLEAN
        Throws:
        java.lang.Exception - If an error occurs
      • DeleteFile

        @ThingworxExtensionApiMethod(since={7,4})
        public void DeleteFile(java.lang.String path)
                                                                  throws java.lang.Exception
        Service Category:
        FileSystemServices
        Service Description:
        Delete a file.
        Parameters:
        path - File path - STRING
        Throws:
        java.lang.Exception - If an error occurs
      • GetDirectoryStructure

        @ThingworxExtensionApiMethod(since={7,4})
        public InfoTable GetDirectoryStructure()
                                                                                  throws java.lang.Exception
        Service Category:
        FileTransfer
        Service Description:
        Get directory structure.
        Returns:
        result The directory structure at the edge - INFOTABLE - Aspects {dataShape:FileSystemDirectory}
        Throws:
        java.lang.Exception - If an error occurs
      • ValidateFileTransfer

        @ThingworxExtensionApiMethod(since={7,4})
        public void ValidateFileTransfer(java.lang.String sid,
                                                                                   java.lang.String toUri,
                                                                                   java.lang.String fromUri,
                                                                                   java.lang.String md5)
                                                                            throws java.lang.Exception
        Service Category:
        FileTransfer
        Service Description:
        validate the file transfer based on the validation signature.
        Parameters:
        sid - File transfer Job ID - STRING
        toUri - File destination uri - STRING
        fromUri - File source uri - STRING
        md5 - Checksum signature used for validation - STRING
        Throws:
        java.lang.Exception - If an error occurs