Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 75566b8608b791c3ebd35522bc3c6c96284ece082ef5902d1f2d3e1b90452c46
Ticket: 560c5e438c47f5fdd34846dbb333ab96cb905416
modernize [file stat] interface
User & Date: aspect on 2021-01-13 03:07:26
Changes

  1. comment changed to:
    This change makes the `varName` argument to [file stat] optional, introducing a 
    1-argument form.  The 2-argument form is unchanged.  The new 1-argument form 
    produces the same errors, but on success returns its result as a dictionary 
    instead of populating an array in the caller's namespace.  The dictionary result 
    is identical with what would be stored in the array.  Calling [file stat] with 
    one argument previously raised a {TCL WRONGARGS} error, so this change can be 
    considered backward-compatible.
    
    Returning a dictionary is beneficial in that it can be passed & returned by value 
    between procs, it can be processed by [dict] commands and the caller has full 
    control over whether and how to store it in a variable.
    
    Attached patch implements such behaviour.  Note that tests cmdAH-28.1 and 
    cmdAH-28.2 are affected by this change. The patch address this issue as well.
    
  2. login: "aspect"
  3. mimetype: "text/plain"