File Modification Time, also known as mtime. On a UNIX filesystem, concepts similar to mtime include atime (access time) and ctime (metadata change time).
Questions tagged [filemtime]
143 questions
0
votes
1 answer
How come python thinks two files were modified in the same nanosecond?
I am trying to run the script below, and almost every time I run it it prints out the same number twice. I find it hard to believe that not even one nanosecond passes between the creation of the first file and the second file, since the system calls…

Joseph Garvin
- 20,727
- 18
- 94
- 165
0
votes
1 answer
how to use filemtime function in PHP?
i have a database like picture bellow :
database
i want to insert date and time based on last modified date from a file on my computer in uploaddate column automtically using filemtime() function in php.
i have tried to use this code :
$namefile=…

Shafira
- 3
- 4
0
votes
0 answers
Matching files based on time and day of week of creation/modification
Is there a suitably Pythonic way of determining if a file was created between particular times on a particular day (or days) of the week - e.g. 09:00 to 17:00 Monday to Friday?
At the moment I have:
def IsEligible(filename, between = None, weekdays…

TimGJ
- 1,584
- 2
- 16
- 32
0
votes
1 answer
twig caching issue - filemtime(): stat failed for ...php in lib\Twig\Cache\Filesystem.php 91
Seems that the twig getTimestamp() function is not fully compatible with PHP 5.5.12 (windows/linux) and throws an exception when the file is not available.
public function getTimestamp($key)
{
return (int) @filemtime($key);
}
We are using Twig…

Robert
- 176
- 1
- 19
0
votes
1 answer
Displaying file contents from filemtime change - php
What I'm trying to do with this code is retrieve and show the content from an html file whenever something in it changes.
Using a refresh meta doesn't cut it and I've been trying to get this to work right since you can't do a infinite loop with…

PIndex
- 1
0
votes
1 answer
Alert when txt file is updated in folder
I'm looking for guidance on a question I can barely grasp as is. I have the content of a .txt file loaded through readfile('stories/'.$sessionid.'.txt'); in PHP. Any user can add text to the .txt file through POST, and I would like for other users…

Lenny
- 446
- 5
- 21
0
votes
0 answers
Check if a file is modified and insert in database PHP
my script is that. It compare files in a folder to files in database. If one file in my folder is not in my database, it inserts it. Now I would like to add a functionalit to compare the modified date of the file. If it has been modified, I insert…

maevy
- 363
- 1
- 3
- 12
0
votes
1 answer
CSS Parser - Insert mtimes
What command line tool can I use to automatically insert mtimes into urls in my css files for the purposes of breaking the cache?
/* before */
.example { background: url(example.jpg); }
/* after */
.example { background: url(example.jpg?1271298451);…

brad
- 73,826
- 21
- 73
- 85
0
votes
0 answers
Last modified time via filemtime($filepath) in php
I am trying to test if write function write the log. The problem is the function don't return anything on success. I tried to find the accomplishment through finding out the last modified time. This is what i have scripted.
/** Log file shows…

Shaonline
- 1,597
- 6
- 18
- 36
0
votes
0 answers
PHP trouble getting file last modified date and filesize
I am having an issue retrieving the file information from inside of a folder.
Of course, I am using PHP. I have various folders, all with various file types. Mostly .txt and .html files.
The code below displays the folders on my web page, as…

yamanzandem
- 57
- 10
0
votes
1 answer
[function.filemtime]: stat failed
I have a script that reads the filemtime of zip files fine when I have the script in the same directory as the files. I can define the $dir two ways and both work.
EG:
$dir = getcwd();
//or
$dir =…

Stev
- 73
- 1
- 9
0
votes
1 answer
find out when a file's contents were last modified
I wrote a CMS script made of many folders and files and I want to find a way to track when I last modified any of the files. I wrote a recursive directory/file check that finds the latest modified file and gives me the date and time however my issue…

marcnyc
- 585
- 1
- 4
- 17
0
votes
1 answer
Converting mtime To Days In Python
I have a file on a remote server, and I'm using pysftp to connect to the server. I'm trying to get how old the file is on the server and I can't seem to find a function to get the AGE in DAYS for the file using pysftp or Paramiko. (If I'm wrong, do…

Jake Z
- 1,113
- 1
- 12
- 22
0
votes
0 answers
Same result over again even if using clearstatcache
Why even if I clear cache for that file and modify it (by adding a space) filemtime stays the same?
clearstatcache(true, $file);
// or clearstatcache()
return date("U", filemtime($file));
It drives me crazy. I've already tried turning off caching…

Szymon Toda
- 4,454
- 11
- 43
- 62
0
votes
1 answer
Output files that are less than X old
I am basically trying to only return files less than 1 day. The posts on here contain deleting files older than X days. I wish to return files that are less than 1 day. I figured it would be as simple as adding filemtime but it doesn't seem to be…

Keelan
- 325
- 1
- 4
- 12