שאלה ב FileSystem

גרג24

New member
שאלה ב FileSystem

איך בודקים מתי נוצר קובץ? (Created) אני מצאתי רק לגבי Modified. תודה.
 

kensaggy

New member
ממממ....

אינני חושב שהדבר אפשרי מכיוון שאין באמת צריך יצירה. תאריך השינוי הראשון הוא בעצם תאריך היצירה.. ז"א שאת תאריך היצירה אפשר לגלות רק בפעם הראשונה שבה באמת מוצר הקובץ (ואז התאריך הזה נמצא בתוך ה modified) לאך מכן התאריך "נעלם" ובמקומו נכנס תאריך העריכה האחרון.. אתה מבין? זה קצת מבלבל.. אז מה שאני מציע לך לעשות זה אולי לשמור את תאריך היצירה בבסיס נתונים..(יחד עם שם הקובץ) (כל מה שכתבתי מבוסס ע"פ מה שקראתי בתיעוד) בהצלחה,חן.
 

N i X

New member
במערכות מבוססות יוניקס

אין creation time, יש ctime ו mtime ctime - כאשר ה"מאפיינים" של הקובץ שונו לאחרונה mtime - כשהמידע שבקובץ שונה לאחרונה תראה במנואל של php את הפונקציות filectime filemtime ו stat
 

N i X

New member
מתוך man 2 stat:

The time-related fields of struct stat are as follows: st_atime Time when file data last accessed. Changed by the mknod(2), utimes(2) and read(2) system calls. st_mtime Time when file data last modified. Changed by the mknod(2), utimes(2) and write(2) system calls. st_ctime Time when file status was last changed (inode data modifica- tion). Changed by the chmod(2), chown(2), link(2), mknod(2), rename(2), unlink(2), utimes(2) and write(2) sys- tem calls.​
 
למעלה