Questions tagged [filemtime]

File Modification Time, also known as mtime. On a UNIX filesystem, concepts similar to mtime include atime (access time) and ctime (metadata change time).

143 questions
0
votes
0 answers

Checking filetime from external server

I'm trying to check when the file on external server was edited last time. The function filemtime() doesn't work and throws an exception. Warning: filemtime() [function.filemtime]: stat failed for…
Budaa
  • 329
  • 3
  • 17
0
votes
2 answers

Execute a phing target when a file has been modified

I have a filelist of about 25 files. I need to execute a certain phing target when the modification time of one of these files has changed. What is the best way to do this?
Nikolay Yordanov
  • 1,404
  • 16
  • 25
0
votes
1 answer

Finding latest file's name and modification time in PHP

I search a director with glob function and get the matched files' list. Then by checking filemtime of the files I create a map. Then sort the map with respect to file dates. At last I get latest file's name and modification time. My code is like…
trante
  • 33,518
  • 47
  • 192
  • 272
0
votes
1 answer

Filemtime error?

I'm having a problem with a bit of script I inherited when I became webmaster of a site. This is the error we're getting: Warning: filemtime() [function.filemtime]: stat failed for /home/public_html/site/modules/chat/cache/locations/2_0.tch in…
0
votes
1 answer

Is saving file and modifying its modification time to the past safe in caching?

Imagine file-based caching of some processes result on linux machine. We're making the process (resource-consuming) only, when there's change in the source data. With every query for the result, we're checking, if the base data are changed. If the…
mrówa
  • 5,671
  • 3
  • 27
  • 39
0
votes
3 answers

Accuracy of stat mtime in Windows

Have an example piece of (Python) code to check if a directory has changed: import os def watch(path, fdict): """Checks a directory and children for changes""" changed = [] for root, dirs, files in os.walk(path): for f in files: …
mavnn
  • 9,101
  • 4
  • 34
  • 52
0
votes
2 answers

Excel - Convert one time format to another

I'm trying to migrate data from one application to another via SQL imports, and I'm at the final step of grabbing the date of entry. The difficulty I'm experiencing is that the date is in some odd format. Examples are as…
Brian Schroeter
  • 1,583
  • 5
  • 22
  • 41
0
votes
1 answer

shell: save and restore mtime based on sha1 hash

I have a set of several thousand files that are automatically re-generated every 24-hours (e.g. ports-readmes on OpenBSD). Most of the time, the content of these files doesn't change, but since they are re-created, the mtime does change. Without…
cnst
  • 25,870
  • 6
  • 90
  • 122
0
votes
2 answers

PHP File Created/Modified Time

I have a PHP site that accepts file uploads from users and needs to store the file creation/modification (they should be the same in this case) date/time in the database. I have tried a few approaches. These all seem to return nothing: $metadata =…
James
  • 741
  • 1
  • 11
  • 28
0
votes
1 answer

filemtime result is lower than filectime by about a year

I've come across a rather strange issue while building a file browser sort of app in PHP. For the purpose of this app, filemtime() is more useful to me, as I need the date of the last modification to the file's content. Unfortunately, the date…
CatalinM
  • 520
  • 1
  • 5
  • 20
0
votes
0 answers

DooPHP :: filemtime(): stat failed for VIEW_FILENAME.html

I'm using Doophp framework and its working perfectly on localhost and xampp but I get filemtime(): stat failed for view_filename.html on web host. Is that a host-side error or framework bug? what do you recommend for this error. here is full stack…
mhesabi
  • 1,140
  • 3
  • 22
  • 48
0
votes
1 answer

filemtime cannot read file modify time

here is my code: date_default_timezone_set('Europe/Baku'); $dh =opendir('C:\Program Files (x86)\Zend\Apache2\htdocs\upload\extjs-4.1.1\welcome\css'); $full_path='C:\Program Files…
Samir Maksimov
  • 105
  • 1
  • 2
  • 9
-1
votes
1 answer

Linux kernel 5.4 how to change code that modifies status change time of a file?

I've found Setting creation or change timestamps, I want to try kernel modification path from the linked answer: https://stackoverflow.com/a/17066309/14557599. However, the answer is 8 years old and as I've checked the user had not posted on SO for…
Martian2020
  • 307
  • 3
  • 12
-1
votes
2 answers

Format filemtime() in human date

how can i display e.g. Today or Yesterday if a file was changed today or yesterday instead of the date with filemtime ? snipped: $date = date('d-m-Y', $timestamp); $today = date('d-m-Y'); $yesterday = date('d-m-Y', strtotime('yesterday'));…
Stan
  • 129
  • 12
-1
votes
1 answer

PHP filemtime of many files

I am trying to determine the filetime of many different files as I'd like to get the version of these files. Is it a good opportunity to add (+) the filemtimes of the files? Doing this gives me a very high number (6807745113). Am I going to reach…
lenny.myr
  • 903
  • 2
  • 11
  • 20
1 2 3
9
10