#fopen()

DESCRIPTION
    open a file for reading, writing, or appending, returning TRUE if successful,
    ERR if unsuccessful
SYNOPSIS
    #fopen(F,s1,s2)
ARGUMENTS
     F - a filehandle (all caps)
    s1 - a string, or string expression, representing a file path
    s2 - any among the strings:  "r", "w", "a"
EXAMPLES
        begin
                if #fopen(MMUSERS, "=mmusers\.tmp", "w") == #err()
                        output mail "Unable to open =mmusers\.tmp for writing!"
                        quit
                endif
        begin   // read in list of authorized suid files for this system
                if #fopen(SUIDFILES, "=files_suid_obj", "r") != #err()
                        while #read(SUIDFILES) > 0
                                =incr(#suid[$rdlin])
                        endwhile
                        do #fclose(SUIDFILES)
                else
                        output mail "Can't open =files_suid_obj for reading!"
                        quit
                fi
SEE ALSO
    #fclose()
    #popen()
    #pclose()
    #read()
    #write()

    Numerical Functions
    String Functions
Home | FAQ | News | Intro | Samples | Tutorial | Reference | Software
Developer's Notes | Licensing | Authors | Pikt-Users | Pikt-Workers | Related Projects | Site Index | Privacy Policy | Contact Us
Page best viewed at 1024x768 or greater.   Page last updated 2019-01-12.   This site is PIKT® powered.
Copyright © 1998-2019 Robert Osterlund. All rights reserved.
Home FAQ News Intro Samples Tutorial Reference Software
PIKT Logo
PIKT Page Title
View sample
motd
config file