ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Stat API and subdirectories

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Stat API and subdirectories

    Having an issue with the STAT api and it reporting back "No such path or directory."
    I am reading a directory and running STAT against each link that is found. I am using stat to determine if the link is a Folder or Stream file. If it is a folder I proceed to read through that. However when i attempt to run STAT against any links i find in the sub directory I am getting a "No such path or directory." error. Trying to determine what I am missing. This is working when reading the parent directory but not the sub directory. Do I need to do something like set current directory when I am reading the sub directory?
    Code:
      // ******************************************************************************************* // * Read Transfer Directory.                                                                   // *******************************************************************************************    DCL-Proc Read_Transfer_Folder;                                                                                                                                                                      Path1  = %TrimR(L10IfsPath) + %TrimR(L10IfsDirT);                                               p_Dir1 = OpenDIR(Path1);                                                                        If P_Dir1 <> *Null;                                                                                p_DIREnt1 = ReadDIR(p_Dir1);                                                                    Dow p_DIREnt1 <> *Null;                                                                             Name = %SubST(DIREnt1.D_Name:1:DirEnt1.D_NameLen);                                              If p_DIREnt1 <> *Null and Name <> '.' and Name <> '..'                                                              and StmF_is_a_Directory(Path1+'/'+Name);                                       Read_Warehouse_Folder();                                                                     EndIF;                                                                                          p_DIREnt1 = ReadDIR(p_Dir1);                                                                EndDO;                                                                                       EndIF;                                                      CloseDIR(p_Dir1);                                                                                                                                                                             Return;                                                                                    End-Proc Read_Transfer_Folder;                                                                                                                                                                                                                                                            // ******************************************************************************************* // * Read Data Directories                                                                     // *******************************************************************************************    DCL-Proc Read_Warehouse_Folder;                                                                    NM = Name;                                                                                     Dsply NM;                                                                                                                                                                                     Path2  = Path1 + '/' + Name;                                                                   p_Dir2 = OpenDIR(Path2);                                                                       If P_Dir2 <> *Null;                                                                               p_DIREnt2 = ReadDIR(p_Dir2);                                                                   Dow p_DIREnt2 <> *Null;                                                                            Name = %SubST(DIREnt2.D_Name:1:DirEnt2.D_NameLen);                                             If p_DIREnt2 <> *Null and Name <> '.' and Name <> '..'                                                                       and StmF_is_a_Directory(Path1+'/'+Name);                                   NM = Name;                                                                                     Dsply NM;                                                                                      EndIF;                                                                                         p_DIREnt2 = ReadDIR(p_Dir2);                                                               EndDO;                                                                                      EndIF;                                                                                         CloseDIR(p_Dir2);                                                                                                                                                                             Return;                                                                                    End-Proc Read_Warehouse_Folder;                                                                                                                                                                                                                                                           // ******************************************************************************************* // * Check if Stream File is a Directory.                                                     // *******************************************************************************************    DCL-Proc StmF_is_a_Directory;                                                                  DCL-PI   StmF_is_a_Directory   Ind;                                                                      Path  VarChar(1024)  Const Options(*VarSize);                                                 End-PI;                                                                                                                                                                                    DCL-S   MyStat    Like(StatDS)   Based(p_MyStat);                              DCL-S p_MyStat    Pointer        Inz;                                          DCL-S   StatSize  Int(10)        Inz;                                          DCL-S   Line      Char(1024);                                                                                                                                   // Get stat info into "MyStat"                                                    StatSize = %Size(MyStat);                                                      p_MyStat = %Alloc(StatSize);                                                   If LStat(Path:p_MyStat) < *Zero;                                                  Line = %str(strerror(errno));                                                  Return *Off;                                                                EndIF;                                                                                                                                                       Return *On;                                                                End-Proc StmF_is_a_Directory;

  • #2
    First attempt to post code did come out like I expected. Should have previewed it first.

    Code:
    // *******************************************************************************************
    // * Read Transfer Directory.                                                                 
    // *******************************************************************************************
       DCL-Proc Read_Transfer_Folder;                                                             
    
           Path1  = %TrimR(L10IfsPath) + %TrimR(L10IfsDirT);                                      
           p_Dir1 = OpenDIR(Path1);                                                               
           If P_Dir1 <> *Null;                                                                    
              p_DIREnt1 = ReadDIR(p_Dir1);                                                        
              Dow p_DIREnt1 <> *Null;                                                             
                  Name = %SubST(DIREnt1.D_Name:1:DirEnt1.D_NameLen);                              
                  If p_DIREnt1 <> *Null and Name <> '.' and Name <> '..'                          
                                      and StmF_is_a_Directory(Path1+'/'+Name);                    
                     Read_Warehouse_Folder();                                                     
                  EndIF;                                                                          
                  p_DIREnt1 = ReadDIR(p_Dir1);                                                    
              EndDO;                                                                              
           EndIF;                                                                                 
           CloseDIR(p_Dir1);                                                                      
    
           Return;                                                                                
       End-Proc Read_Transfer_Folder;                                                             
    
    
    // *******************************************************************************************
    // * Read Data Directories                                                                    
    // *******************************************************************************************
       DCL-Proc Read_Warehouse_Folder;                                                            
           NM = Name;                                                                             
           Dsply NM;                                                                              
    
           Path2  = Path1 + '/' + Name;                                                           
           p_Dir2 = OpenDIR(Path2);                                                               
           If P_Dir2 <> *Null;                                                                    
              p_DIREnt2 = ReadDIR(p_Dir2);                                                        
              Dow p_DIREnt2 <> *Null;                                                             
                  Name = %SubST(DIREnt2.D_Name:1:DirEnt2.D_NameLen);                              
                  If p_DIREnt2 <> *Null and Name <> '.' and Name <> '..'                          
                                      and StmF_is_a_Directory(Path1+'/'+Name);                    
                  NM = Name;                                                                      
                  Dsply NM;                                                                       
                  EndIF;                                                                          
                  p_DIREnt2 = ReadDIR(p_Dir2);                                                    
              EndDO;                                                                              
           EndIF;                                                                                 
           CloseDIR(p_Dir2);                                                                      
    
           Return;                                                                                
       End-Proc Read_Warehouse_Folder;                                                            
    
    
    // *******************************************************************************************
    // * Check if Stream File is a Deirectory.                                                    
    // *******************************************************************************************
       DCL-Proc StmF_is_a_Directory;                                                              
       DCL-PI   StmF_is_a_Directory   Ind;                                                        
                 Path  VarChar(1024)  Const Options(*VarSize);                                    
                End-PI;                                                                           
    
       DCL-S   MyStat    Like(StatDS)   Based(p_MyStat);                                  
       DCL-S p_MyStat    Pointer        Inz;                                              
       DCL-S   StatSize  Int(10)        Inz;                                              
       DCL-S   Line      Char(1024);                                                      
    
         // Get stat info into "MyStat"                                                   
            StatSize = %Size(MyStat);                                                     
            p_MyStat = %Alloc(StatSize);                                                  
            If LStat(Path:p_MyStat) < *Zero;                                              
               Line = %str(strerror(errno));                                              
               Return *Off;                                                               
            EndIF;                                                                        
    
           Return *On;                                                                    
       End-Proc StmF_is_a_Directory;                                                      
    
      /Define ERRNO_LOAD_PROCEDURE                                                        
      /Include QCPYSRC,ERRNO_H             // Integrated File System - Prototypes

    Comment


    • #3
      Hard to tell what's going on without seeing the protos and the data definitions you are using.

      First guess would be a failure to null terminate the file string sent to stat(). Or a failure to trim trailing spaces from the name.

      Comment


      • #4
        I'm thinking that indeed, like JonBoy writes, you've got some form of spaces inside your path, directory, or subdirectory name is concantenated. Every time I've had the same problem you seem to be experiencing, this has been the problem. I've found it by debugging what you're actually passing to STAT and comparing it to what the real names actually are. I've also seen (usually rarely) that sometimes there are spaces included within the directory and subdirectory themselves... usually this is not a problem, however, should there be spaces within those names, you would have to surround the entire name in quotes before passing it to the STAT routine. I'm thinking of a directory name like "Sales 012018" or something similar.

        As far as your posted code goes, I do not see where your field 'Name" is trimmed when adding it into the path/directory you're using.

        Best Regards,
        Fred Williams

        Comment


        • Whitecat27
          Whitecat27 commented
          Editing a comment
          Instead of "spaces inside your path, directory, or subdirectory name is concantenated" should read "spaces inside your path, directory, or subdirectory name when it is concantenated".

      • #5
        You mention that you are having trouble with the stat() API. Most of the code you posted, however, is using the opendir, readdir and closedir APIs. Are those working properly for you?

        You did post one subprocedure that uses the lstat() API (which is very similar to stat, and might be what you're referring to):

        Code:
        DCL-Proc StmF_is_a_Directory;
        DCL-PI StmF_is_a_Directory Ind;
        Path VarChar(1024) Const Options(*VarSize);
        End-PI;
        
        DCL-S MyStat Like(StatDS) Based(p_MyStat);
        DCL-S p_MyStat Pointer Inz;
        DCL-S StatSize Int(10) Inz;
        DCL-S Line Char(1024);
        
        // Get stat info into "MyStat"
        StatSize = %Size(MyStat);
        p_MyStat = %Alloc(StatSize);
        If LStat(Path:p_MyStat) < *Zero;
        Line = %str(strerror(errno));
        Return *Off;
        EndIF;
        
        Return *On;
        End-Proc StmF_is_a_Directory;
        This code doesn't look right to me for several reasons:

        1) Why are you manually allocating memory for "MyStat"? If you simply did not make it BASED, RPG would've allocated the memory for you. If you used LIKEDS instead of LIKE, it'd have all the fields defined and there'd be no reason to fool around with pointers. The only reason I could see for coding it this way is to make it compatable with VERY old versions of RPG, such as V4R5. But, that doesn't make sense either because the code is in free format, and therefore would never work on those very old versions.

        2) If you really do want to use %ALLOC and do it yourself, then you will need to deallocate the memory when you're done. You aren't doing that anywhere.

        3) You never set StatSize to a value, so it will be 0. It makes no sense to allocate 0 bytes.

        4) The procedure is supposed to check if a given path is a file or a directory. The proper way to determine if something is a directory is by checking the directory bit of the mode. (This is a much better choice than checking the object type because there are many different object types that should be treated as directories.) But, you aren't doing anything to check whether it's a directory, you're just always returning *ON unless there's an error.

        5) When there's an error, you put the error message in a variable named "line" (unusual name for an error message) but you never use it, so the error message would be discarded without being used.


        Comment


        • #6
          JonBoy and Whitecat27 fiedls Path1 and Name are variable length fields. The directory names have no spaces in them. I have been trying to code to account for spaces in the Stream file names.

          Scott:

          1. I am working with a IFSIO_H where the StatDS data structure is BASED TEMPLATE. I was having difficulty trying to work with that. Trying to do something like

          DCL-S MYStatDS LikeDS(StatDS) Based(p_MYStatDS)

          Every example I had seen hads the ier StatDS data structured code like:

          DCL-DS StatDS Based(p_StatDS).

          In trying to get this to work leads to your second question.

          2.) The Alloc cam from the example from the site:


          Based upon what I came up with this appeared to do what I wanted.

          3.) Thought that was being set correctly and thought code was working initially.

          4.) In researching this saw one of your examples were you checked the Mode, Thought this was a simpler approach and went with this. In my research did not come across anything mentioning checking mode is the preferred approach. Took me a while before I started coming across anything about checking for a directory.

          5.) The variable Line was for debugging purposes so I could see what the actual error was.

          I was using the following link as reference when coding this: http://www.scottklement.com/rpg/ifs_ebook/


          Comment


          • #7
            We had built the following based on Scott's excellent work. Thank you Scott!

            I hope it helps.

            Walt

            Code:
                 p isIfsDirectory  b                   export                                                  
                 d isIfsDirectory  pi              n                                                            
                 d  ifsObject                 65535a   const varying options(*VARSIZE)                          
                 d  Msg                                likeds(sysMsgInfo) options(*NOPASS)                      
            
                 d TmpMsg          ds                  likeds(sysMsgInfo) inz                                  
            
                   if getIFSfileStats(ifsObject: TmpMsg);                                                          
                     if %bitand(ifsStat.mode :x'01f000') = 16384;                                              
                       return TRUE;                                                                            
                     endif;                                                                                    
            
                   else;                                                                                        
                     if %parms() = 2;                                                                          
                       Msg = TmpMsg;                                                                            
                     endif;                                                                                    
            
                   endif;                                                                                      
            
                   return FALSE;                                                                                
            
                 p                 e                                                                            
            
                 p getIFSfileStats...                                                                          
                 p                 b                   export                                                  
                 d getIFSfileStats...                                                                          
                 d                 pi              n                                                            
                 d ifsFile                      512a   const varying options(*VARSIZE)                          
                 d Msg                                 likeds(SysMsgInfo)                                      
            
                  * API parameters                                                                              
                 d lIFSfile        s            256a   varying inz(*BLANKS)                                    
            
                   clear Msg;                                                                                  
                   clear IFSstat;                                                                              
            
                   lIFSfile = %trim(ifsFile) + NULL;                                                            
            
                   // Use the stat API to retrieve IFS file info (stored in global data structure)              
                   if stat(lIFSfile: %addr(IFSstat)) <> *ZERO;                                                  
            
                     return FALSE;                                                                              
                   endif;                                                                                      
            
                   // Check for Error in execution of the command                                              
                   if %error;                                                                                  
            
                     Msg.id = PgmSts.msgId;                                                                    
                   endif;                                                                                      
            
                   return TRUE;                                                                                
            
                 p                 e                                                                            
            
                  * get IFS File Statistics                                                                    
                 d stat            pr            10i 0 extproc('stat')                                          
                 d  path                           *   value options(*String)                                  
                 d  buffer                         *   value                                                    
            
            
            
                 d IFSstat...                                                                                  
                 d                 ds                  qualified inz                                            
                 d  mode                         10u 0                                                          
                 d  ino                          10u 0                                                          
                 d  nlink                         5u 0                                                          
                 d  pad                           2a                                                            
                 d  uid                          10u 0                                                          
                 d  gid                          10u 0                                                          
                 d  size                         10i 0                                                          
                 d  atime                        10i 0                                                          
                 d  mtime                        10i 0                                                          
                 d  ctime                        10i 0                                                          
                 d  dev                          10u 0                                                          
                 d  blksize                      10u 0                                                          
                 d  alctize                      10u 0                                                          
                 d  objtype                      12a                                                            
                 d  codepag                       5u 0                                                          
                 d  reserved1                    62a                                                            
                 d  ino_gen_id                   10u 0                                                          
            
            
                  * System message data structure                                                              
                 D SysMsgInfo      DS                  qualified template inz                                  
                 D  id                            7a                                                            
                 D  msgType                      10a                                                            
                 D  severity                     10i 0                                                          
                 D  textLvl1                    132a                                                            
                 D  textLvl2                    512a                                                            
                 D  data                        512a                                                            
            
                 D NULL            C                   X'00'
            Last edited by wegrace; February 22, 2018, 12:54 PM.

            Comment


            • #8
              The "IFS EBOOK" that you cite was written for V4 RPG, which was before IBM added a lot of features available today, including LIKEDS, free format, etc. If you got the IFSIO_H copy book from there, then you have a very old copy (2002) of that as well. You'd be better off using the newer (2006) one from here:


              Originally posted by DAG0000 View Post
              1. I am working with a IFSIO_H where the StatDS data structure is BASED TEMPLATE. I was having difficulty trying to work with that. Trying to do something like

              DCL-S MYStatDS LikeDS(StatDS) Based(p_MYStatDS)
              To be clear, my recommendation is to completely eliminate the BASED keyword. It serves no purpose, unless you want to manually/dynamically control the memory.

              Originally posted by DAG0000 View Post
              4.) In researching this saw one of your examples were you checked the Mode, Thought this was a simpler approach and went with this. In my research did not come across anything mentioning checking mode is the preferred approach. Took me a while before I started coming across anything about checking for a directory.
              Right, checking the mode is what I recommend. You say that you "went with this", but there was no code that was doing it in your post. If you made changes later, then perhaps you're already doing it?

              Putting those things together, I came up with code like this:

              Code:
              [COLOR=#ff0000]DCL-Proc[/COLOR] StmF_is_a_Directory;
              
              [COLOR=#ff0000]DCL-PI[/COLOR] StmF_is_a_Directory [COLOR=#a52a2a]Ind[/COLOR];
                  Path [COLOR=#a52a2a]VarChar[/COLOR]([COLOR=#008000]1024[/COLOR]) [COLOR=#a52a2a]Const[/COLOR] [COLOR=#a52a2a]Options[/COLOR]([COLOR=#ffa500]*VarSize[/COLOR]);
              [COLOR=#ff0000]End-PI[/COLOR];
              
              [COLOR=#ff0000]DCL-DS[/COLOR] MyStat [COLOR=#a52a2a]LikeDS[/COLOR](StatDS) ;    [COLOR=#008000]// <-- no BASED keyword![/COLOR]
              [COLOR=#ff0000]DCL-S[/COLOR] StatSize [COLOR=#a52a2a]Int[/COLOR]([COLOR=#008000]10[/COLOR]) [COLOR=#a52a2a]Inz[/COLOR];
              [COLOR=#ff0000]DCL-S[/COLOR] Line [COLOR=#a52a2a]Char[/COLOR]([COLOR=#008000]1024[/COLOR]);
              
              [COLOR=#008000]// Get stat info into "MyStat"[/COLOR]
              [COLOR=#008000]//  Use %TRIMR() in case caller passed extra blanks[/COLOR]
              [COLOR=#008000]//  Old versions of IFSIO_H might require %ADDR(MYSTAT)[/COLOR]
              [COLOR=#800080]If[/COLOR] LStat([COLOR=#0000ff]%trimr[/COLOR](Path): MyStat) < [COLOR=#ffa500]*Zero[/COLOR];
              [COLOR=#008000]// Line = %str(strerror(errno));[/COLOR]
              [COLOR=#800080]Return[/COLOR] [COLOR=#ffa500]*Off[/COLOR];
              [COLOR=#800080]EndIF[/COLOR];
              
              [COLOR=#008000]// This bit of the mode will tell you if it[/COLOR]
              [COLOR=#008000]//  is a directory.  This includes all "directory like"[/COLOR]
              [COLOR=#008000]//  object files (*DIR, *LIB, *DDIR, *FILE, etc)[/COLOR]
              
              [COLOR=#800080]if[/COLOR] [COLOR=#0000ff]%bitand[/COLOR]( myStat.st_mode : x[COLOR=#008000]'4000'[/COLOR]) = x[COLOR=#008000]'4000'[/COLOR];
              [COLOR=#800080]Return[/COLOR] [COLOR=#ffa500]*ON[/COLOR];
              [COLOR=#800080]else[/COLOR];
              [COLOR=#800080]Return[/COLOR] [COLOR=#ffa500]*OFF[/COLOR];
              [COLOR=#800080]endif[/COLOR];
              
              [COLOR=#ff0000]End-Proc[/COLOR] StmF_is_a_Directory;
              Note that in the current version of IFSIO_H, the 2nd parameter to lstat() is not a pointer, it is a data structure. It's possible (though, I can't find it right now) that an old version used a pointer instead. If you need to make it work with a copy where lstat's 2nd parameter is a pointer passed by value, you can code it with %ADDR to get the same result:
              Code:
              [COLOR=#800080]If[/COLOR] LStat([COLOR=#0000ff]%trimr[/COLOR](Path): [COLOR=#0000ff]%addr[/COLOR](MyStat)) < [COLOR=#ffa500]*Zero[/COLOR];
              [COLOR=#008000]// Line = %str(strerror(errno));[/COLOR]
              [COLOR=#800080]Return[/COLOR] [COLOR=#ffa500]*Off[/COLOR];
              [COLOR=#800080]EndIF[/COLOR];
              Either way, there's no reason to use a pointer, and especially no reason to use BASED() which makes the code much more error-prone (unless you're good with pointers and memory allocations.)

              Comment


              • #9
                Scott,

                I am using the IFSIO_H from the link you posted. the StatDS is using the based keyword and the buffer parms in the prototypes for STAT and LSTAT are using LikeDS (this was another thing that was throwing me at first).

                Code:
                     D statds DS qualified
                     D                                     BASED(Template)
                
                     D stat            PR            10I 0 ExtProc('stat')
                     D   path                          *   value options(*string)
                     D   buf                               likeds(statds)
                
                     D lstat           PR            10I 0 ExtProc('lstat')
                     D   path                          *   Value options(*string)
                     D   buf                               likeds(statds)
                I had modified the prototypes so that the were pointers. I had originally been working with the STAT api and was experimenting with LSTAT while trouble shooting. The original example I had posted was using LSTAT.


                On the mode What I meant to imply was that I had went with the example from the IBM link I posted:


                I also see were I missed them DE allocating at the end. I modified my code and went with example you have in your eBook:



                I will most likely use what you posted in you reply in regards to the mode as it appears to be simpler and quicker than the eBook version.

                My code so far came pretty close to what you posted in your reply. I just need to tweak it a bit more.
                Thank you for your assistance.

                Comment


                • #10
                  Originally posted by DAG0000 View Post
                  I am using the IFSIO_H from the link you posted. the StatDS is using the based keyword and the buffer parms in the prototypes for STAT and LSTAT are using LikeDS (this was another thing that was throwing me at first).
                  Yes, these are the correct definitions.

                  Prior to V6R1, RPG did not have the "Template" keyword. The BASED keyword is used here to prevent it from occupying memory since it is ONLY to be used as a template (you never use "statds" directly, only as the target of a LIKEDS keyword.) Using BASED was how we kept it from wasting memory before V6R1. That is why BASED references a pointer named "template" -- nobody actually would make a pointer with that name, but when they see it, it makes it clear that its to be used as a template. If I wanted to break compatability with V5R4, I could replate BASED(TEMPLATE) with just TEMPLATE, and that would be a little bit nicer, but there really hasn't been a reason to take the time to do that.

                  Originally posted by DAG0000 View Post
                  I also see were I missed them DE allocating at the end. I modified my code and went with example you have in your eBook:
                  Please use the example I posted here, not the stuff from the e-book, as that is much older.

                  Comment


                  • #11
                    Originally posted by DAG0000 View Post
                    JonBoy and Whitecat27 fiedls Path1 and Name are variable length fields. The directory names have no spaces in them. I have been trying to code to account for spaces in the Stream file names.
                    DAG000,

                    It is to also note, that "variable length fields" have an extra character at the beginning of the field(s) mentioned... that contain the actual length of the field. So, if your variable length field is defined as 128, it is actually 129 long, so that if you are missing the CR/LF characters You may have code that does bit take this into account within your programming. This fact would explain why you're not seeing the EOF characters in your reads when detecting an EOF condition.

                    Or something like that... Just a thought here.


                    Best Regards,
                    Fred Williams

                    P.S. Thanks to Jon and Susan for that info...


                    Comment


                    • Whitecat27
                      Whitecat27 commented
                      Editing a comment
                      I meant "does not take into account, instead of "does not take bit into account"... sorry... I've not had a lot of sleep lately.

                  • #12
                    Fred,

                    varying/varchar fields have either 2 or 4 bytes of length information (depending on the size of the field). So you're right that a field declared as 128 varchar/varying is not actually 128 bytes of storage, but it's not 129 either... it'll be 130. Fields larger than 64k will be 4 bytes larger. (though, the option also exists to specify whether to use a 4 byte length on shorter fields in case you wanted to force it to use 4 bytes extra instead of 2.)

                    I don't understand what the inner workings of the varying field have to do with this conversation, though. For concatenating directory./file names (which is what I thought you were refering to) you don't have to worry about how RPG does things under the covers, it'll take care of all of that for you.

                    With regards to EOF characters -- most formats don't actually use a character to specify the end of a file. Instead, they determine the end of the file based, quite simply, on reaching the end of the data that's on disk for that file. I think you are confusing EOF characters with the EOL (end of line) characters such as LF or CRLF. Some applications put EOL characters on the end of every line, but some do not put them on the final line of a text document. This has been an ongoing area of frustration and disagreement amongst programmers since at least the 1970's, where people can get into heated arguments about which format is "better". My approach is simply to write a routine that works for the job I'm doing, and not get into the debate ;-)

                    Comment


                    • #13
                      I was having trouble with the stat API myself. I have several copies of IFSIO_H - one was originally downloaded as part of IFSEBOOK and subsequently updated using the link above. The other copy is located in LIBHTTP (from the HTTPAPI).

                      What has me puzzled is that the HTTPAPI version I have indicates "Copyright (c) 2001-2016 Scott C. Klement". However, the stat, lstat, and fstat prototypes are defined as follows:

                      Code:
                      D*--------------------------------------------------------------------   
                      D* Get File Information                                                  
                      D*                                                                       
                      D* int stat(const char *path, struct stat *buf)                          
                      D*--------------------------------------------------------------------   
                      D stat            PR            10I 0 ExtProc('stat')                    
                      D   path                          *   value options(*string)             
                      D   buf                           *   value
                      Just wondering if I somehow screwed these up.

                      Comment


                      • #14
                        No, you didn't screw them up. Originally, my "regular" copy of IFSIO_H and the HTTPAPI one were the same, but over time they evolved a bit differently. I improved the regular one, but didn't want to break the code in HTTPAPI, so I didn't change it. Now that so many people use HTTPAPI (lots of shops) I'm afraid to change that copy, for fear that it'd break something in an existing program,

                        Comment

                        Working...
                        X