Code archives/File Utilities/osx file attributes
This code has been declared by its author to be Public Domain code.
Download source code
| |||||
Find various file attributes on osx:- - Last accessed: Use ctime(&fst.st_atime) - Last modified: Use ctime(&fst.st_mtime) - Last changed: Use ctime(&fst.st_ctime) C++ code in the example returns 'Last accessed' information. Sorry, this is for Blitzmax... I buggered the language tagging up! Sorwy | |||||
//findmeta.m #include <sys/stat.h> char * FindMeta(char *filepath) { struct stat fst; bzero(&fst,sizeof(fst)); if (stat(filepath,&fst) != 0) { return("");} return(ctime(&fst.st_atime)); } 'Blitzmax example Import "findMeta.m" Extern "C" Function FindMeta$z(filepath:Byte Ptr) End Extern Print FindMeta(CurrentDir$()+"/test.app") |
Comments
None.
Code Archives Forum