Skip to content

Instantly share code, notes, and snippets.

@sguzman
Created February 15, 2014 20:14
Show Gist options
  • Save sguzman/9024663 to your computer and use it in GitHub Desktop.
Save sguzman/9024663 to your computer and use it in GitHub Desktop.
#include <sys/stat.h>
#include <stdio.h>
int main(int argc, char *argv[])
{
if (argc != 2)
{
return 0;
}
struct stat buffer;
if (stat(argv[1], &buffer) == 0)
{
printf("Yes.\n");
}
else
{
printf("No.\n");
}
return 0;
}
@sguzman
Copy link
Author

sguzman commented Feb 18, 2014

Now if only it were built-in, it could actually beat ls ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment