• isexist(): filepath not exist/or file/or folder

    From digi_cs@cosmogen@gmail.com to comp.lang.awk on Mon Mar 31 15:56:45 2025
    From Newsgroup: comp.lang.awk

    Hi Everyone!

    Let me introduce isexist() function to those who work extensively with the file system while programming in gawk. This function provides a fast way to check whether a path exists and what it points to: a file or a folder.

    The isexist() function is "packaged" into a small library file, isexist.lib, available for download at:

    github.com/digics/isarray10

    The link also provides access to documentation files in two languages and an example.awk file containing usage examples of the isexist() function, which is also available for download there.

    I would be glad if this function proves useful to gawk users who actively work with the file system.

    Regards
    digi_cs 2025


    --------------= Posted using GrabIt =----------------
    ------= Binary Usenet downloading made easy =---------
    -= Get GrabIt for free from https://www.shemes.com/ =-

    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From gazelle@gazelle@shell.xmission.com (Kenny McCormack) to comp.lang.awk on Mon Mar 31 13:49:35 2025
    From Newsgroup: comp.lang.awk

    In article <67ea910e$0$711$14726298@news.sunsite.dk>,
    digi_cs <cosmogen@gmail.com> wrote:
    ...
    I would be glad if this function proves useful to gawk users who actively work >with the file system.

    It would have been better to have posted the code here.

    As it is, few people will take the time to fire up a browser and follow
    your links.
    --
    On the subject of racism being depicted in the media, the far right and the far left have
    met up in agreement (sort of like how plus infinity meets up with minus infinity).
    The far left doesn't want it, because they are afraid it will make people racist.
    The far right doesn't want it, because they are afraid it will make people feel bad about being racist.
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From Ed Morton@mortonspam@gmail.com to comp.lang.awk on Mon Mar 31 19:26:35 2025
    From Newsgroup: comp.lang.awk

    On 3/31/2025 7:56 AM, digi_cs wrote:
    Hi Everyone!

    Let me introduce isexist() function to those who work extensively with the file system while programming in gawk. This function provides a fast way to check whether a path exists and what it points to: a file or a folder.

    I haven't had a need for this personally but can't we already do that
    and more with the `stat` function from the `filefuncs` extension
    described at https://www.gnu.org/software/gawk/manual/gawk.html#Extension-Example?

    Ed.
    --- Synchronet 3.20c-Linux NewsLink 1.2