Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: e16ca1b875e22cc110403c97cb26b81551a6ebe7
Ticket: 1622579fffffffffffffffffffffffffffffffff
open fails to open hidden files for writing
User & Date: fvogelnew1 on 2007-01-04 03:38:29
Changes

  1. icomment:
    Logged In: YES 
    user_id=1245417
    Originator: YES
    
    I understand your answer and I thank you very much for your so clear explanations.
    
    What I need is a mode that will let me write my file in any case, i.e. to overwrite if the file exists (no append), or to create the file if it does not yet exist. And this, whether the file is hidden or not.
    
    From the "open" man page, I had understood that "WRONLY CREAT TRUNC" was what I needed, and translated this simply into "w".
    
    I now understand that I should use "WRONLY CREAT", right?
    
    But for TRUNC I can read:
    "If the file exists it is truncated to zero length."
    
    But this seems to be what I need! Because otherwise I would append, or am I missing something?
    
    Anyway, it seems from my tests that I actually don't need the TRUNC parameter. Question is "why?"
    
    Thanks,
    Francois
    
    
    
  2. login: "fvogelnew1"
  3. mimetype: "text/plain"
  4. status changed to: "Open"
  5. username: "fvogelnew1"