filemtime Questions

5

Solved

I already read it so many questions and answers about it but I can't still solve my problem... I'm trying to create a function that deletes all the files with "xml" or "xsl" extension that has bee...
Overstuffed asked 14/11, 2012 at 19:40

11

Solved

I'm writing a photo gallery script in PHP and have a single directory where the user will store their pictures. I'm attempting to set up page caching and have the cache refresh only if the contents...
Elegize asked 12/2, 2009 at 7:4

6

Solved

I'm trying to display an array of files in order of date (last modified). I have done this buy looping through the array and sorting it into another array, but is there an easier (more efficient) ...
Pankhurst asked 24/9, 2008 at 1:51

5

Solved

I there, I am currently writing a unit test which asserts that a file did not get modified. The test code execution takes less than one second and therefore I would like to know if it is possible t...
Aguedaaguero asked 27/5, 2010 at 18:34

3

I'm trying to determine if it's better to store an image's last modified date in a MySQL database or use the PHP function filemtime. In my case, all of the website info is stored in a database (cm...
Ludicrous asked 13/6, 2019 at 21:34

2

Solved

On Windows 7 and Mac OS 10.12.2 (with R 3.3.2), it appears that file.mtime() severely rounds or truncates timestamps. I verified that file.create("my_file.txt"); print(as.numeric(file.mtime("my_fil...
Atul asked 9/2, 2017 at 2:26

1

Solved

Is there a way of preserving the timestamp when using Paramiko to SFTP files from one server to another similar to the -p argument in Linux? Original file: jim@vm3634:~$ ls -la -rwxrwx--- 1 jim...
Flatware asked 31/3, 2015 at 8:10

2

Solved

I have a folder with 4 files in it and I'd like to pull the last modified time of the most recent one (which may not always be the same one). Is there a good way to do that?
Subsidiary asked 20/7, 2011 at 19:26

1

With batch variable/parameter expansion like %~t1 one can get a timestamp of a file. I would like to set the year of the file to another variable would like to support multiple locales. How can y...
Brandeebranden asked 2/9, 2014 at 20:23

4

Solved

For a file containing few bytes under Linux, I need only to process when it was changed since the last time it was processed. I check whether the file was changed by calling PHP clearstatcache(); f...
Morphine asked 1/5, 2011 at 17:46

2

Solved

I want to check if a file is older than a certain amount of time (e.g. 2 days). I managed to get the file creation time in such a way: >>> import os.path, time >>> fileCreation ...
Fluorescein asked 15/9, 2011 at 12:36

2

Solved

I wish to change the timestamp metadata on files in Java using the java.nio.Files class. I would like to change all 3 Linux/ext4 timestamps (last modified, access, and changed). I am able to chan...
Nan asked 21/4, 2013 at 1:12

2

Solved

I use the PHP function filemtime to get the last modification time with PHP 5.3. This functions works very well but it seems to have some problems when the filenames have special characters (for ex...
Crookback asked 3/10, 2011 at 18:50

5

I am creating a WordPress plugin and can see that on some servers, for certain files, the stat (or filemtime) returning invalid mtime value. In some cases it is a negative value or a very large val...
Waiter asked 13/12, 2012 at 20:40

3

Solved

i'm using filemtime for fingerprinting external resources in html, like: <link rel="stylesheet" href="screen-<?=md5(filemtime('screen.css'));?>.css"> I noticed a significant delay be...
Cellophane asked 28/11, 2012 at 15:34

1

Solved

Try running <?php echo filemtime("test.txt")."\n"; sleep(4); file_put_contents("test.txt", "test"); echo filemtime("test.txt")."\n"; ?> For me the command line printed: 1343490984 134...
Tipcat asked 28/7, 2012 at 16:2

1

Solved

Let's clarify this once and for all. I tried to Google this but it seems this information can't be found in one place. When a file is created or removed, the holding directory mtime changes on Win...
Janeljanela asked 17/7, 2012 at 8:12
1

© 2022 - 2025 — McMap. All rights reserved.