; Module/File: System_GetFileState.pb ; Function: Shows File-Data - Linux ; Author: Progi1984 / Omi ; Date: Sep. 14, 2014 ; Version: 0.1 ; Target Compiler: PureBasic 5.22/5.31 ; Target OS: Linux: (X/K/L)ubuntu, Mint, 32/64, Ascii/Uni ;-------------------------------------------------------------- Structure FILESTAT st_dev.l _unused_1.l _unused_2.l st_ino.l st_mode.l st_nlink.l st_uid.l st_gid.l st_rdev.l _unused_3.l _unused_4.l st_size.l st_blksize.l st_blocks.l st_atime.l st_atime_nsec.l st_mtime.l st_mtime_nsec.l st_ctime.l st_ctime_nsec.l __unused4.l __unused5.l EndStructure Global.s File= "/home/charly-xubuntu/.bashrc"; Change to existing File !!! Global FileState.FILESTAT Global InfoSucccess Debug "FILESTATE " + File + " ..." InfoSucccess= stat_(@File, @FileState) Debug "Success: " + Str(InfoSucccess); 0= successfull, set an existing file Debug "DEV : "+Str(FileState\st_dev); /* ID of device containing file */ Debug "INO : "+Str(FileState\st_ino); /* inode number */ Debug "MODE : "+Str(FileState\st_mode); /* protection */ Debug "NLINK : "+Str(FileState\st_nlink); /* number of hard links */ Debug "UID : "+Str(FileState\st_uid); /* user ID of owner */ Debug "GID : "+Str(FileState\st_gid); /* group ID of owner */ ;Debug "RDEV > "+Str(FileState\st_rdev); /* device ID (if special file) */ Debug "SIZE : "+Str(FileState\st_size); /* total size, in bytes */ Debug "BLKSIZE: "+Str(FileState\st_blksize); /* blocksize for file system I/O */ Debug "BLOCKS : "+Str(FileState\st_blocks); /* number of 512B blocks allocated */ Debug "ATIME : "+Str(FileState\st_atime); /* time of last access */ Debug "ATIME Format :" +FormatDate("%dd/%mm/%yyyy %hh:%ii:%ss", FileState\st_atime) Debug "ATIME_nsec : "+Str(FileState\st_atime_nsec) Debug "MTIME : "+Str(FileState\st_mtime); /* time of last modification */ Debug "MTIME Format :" +FormatDate("%dd/%mm/%yyyy %hh:%ii:%ss", FileState\st_mtime) Debug "MTIME_nsec : "+Str(FileState\st_mtime_nsec) Debug "CTIME : "+Str(FileState\st_ctime); /* time of last status change */ Debug "CTIME Format :" +FormatDate("%dd/%mm/%yyyy %hh:%ii:%ss", FileState\st_ctime) Debug "CTIME_nsec : "+Str(FileState\st_ctime_nsec) Debug " ---" ; IDE Options = PureBasic 5.40 LTS Beta 9 (Linux - x86) ; CursorPosition = 2 ; EnableUnicode ; EnableXP