[Gambas-bugtracker] Bug #1536: File System Link Support

bugtracker at gambaswiki.org bugtracker at gambaswiki.org
Wed Feb 27 21:31:22 CET 2019


http://gambaswiki.org/bugtracker/edit?object=BUG.1536&from=L21haW4-

Comment #1 by Cedron DAWG:

A little research:

#include <stdio.h>
#include <sys/stat.h>

int main ( int argc, char ** argv ) {
    int     i;
    struct stat st;     /* stat puts info here */

    for (i = 1; i < argc; ++i) {
        if (stat(argv[i], &st) == -1) perror(argv[i]);
        else printf("%s has %d hard links\n", argv[i], st.st_nlink);
    }
    return 0;
}

// https://stackoverflow.com/questions/35353712/how-does-the-ls-command-find-the-hard-link-count



// https://stackoverflow.com/questions/18159662/get-real-path-of-a-symlink

Result = GetRealPath( Path )

is a better name.




More information about the Bugtracker mailing list