[Contents] [Index] [Help] [Browse <] [Browse >]


amarquee.library/QRenameOp           amarquee.library/QRenameOp

   NAME
    QRenameOp - Rename a data entry to another name.

   SYNOPSIS
    #include 

    LONG QRenameOp(struct QSession * session, char * path, char * label)

   FUNCTION
    This function tells the AMarquee server to rename a node to another
    label.  Nodes may only be renamed in their current directory;
    they can not be moved to another directory with this command.
    
   NOTE
    Other clients will see this operation as a deletion of the old
    node and the creation of the new one.  
    
    Also note that while "path" should be a regular node path name, 
    "label" should just be just the name of the node itself--the rest 
    of the path is assumed to be the same.
    
    You can only rename nodes in your own directory tree.
    
   INPUTS
    session - The session to send the rename op to.
    path    - The pathname of the node to rename
    label   - The new label the node is be renamed to.
    
   RESULTS
    Returns the assigned ID number of the rename operation on success,
    or 0 on failure.  Any server-side errors will be sent asynchronously
    as QMessages.

   EXAMPLE
    LONG transID;
    
    /* Changes node /myHost/myProgram/myDir/node1 into
                    /myHost/myProgram/myDir/node2 */
    if (transID = QRenameOp(session, "myDir/node1", "node2"))
       printf("Rename op succeeded, was given id #%li\n",transID);
    else 
       printf("Rename op failed.  (no memory?)\n");

   AREXX EXAMPLE
    transID = QRenameOp(session, 'myDir/node1', 'node2')
    if (transID = 0) then say "Oops, operation failed"
    
   SEE ALSO
    QGo
    

Converted on 24 Mar 2002 with RexxDoesAmigaGuide2HTML 2.1e(private) by Michael Ranner.