lastaccesstime

How to get the last access date of any resource in a bucket in amazon s3 in node.js?

不羁岁月 提交于 2021-02-08 05:18:33
问题 I am trying to get the last access date of a resource in a bucket. But not able find anything related to it. I tried to fetch all the access logs for a bucket and parsed the logs files to check if a resource is accessed. This is a very complex approach. In the s3.listObjects I am getting the below object:- { Key: '_636579271588176973_951622.json', LastModified: 2018-08-02T08:31:29.000Z, ETag: '"c348574fabf83d603984a60983add161"', Size: 32172, StorageClass: 'STANDARD', Owner: [Object] }, 回答1:

Remove Azure blob storage contents that are untouch for period of time

99封情书 提交于 2019-12-11 02:25:11
问题 The application I developed basically allows users to upload contents and get stored in Azure Blob Storage. Since the nature of the contents are for quick sharing between users, many of the contents are quickly become untouched after a period of time. But for some contents can be used over and over again. In order to stop the unprecedented growth of the size of blob storage, I am planning to write tool that basically find any blobs that aren't used for period of time and delete them off the

.Net File.GetLastAccessTime updates Last Access Time of file

别等时光非礼了梦想. 提交于 2019-12-10 14:58:41
问题 We are using below line to get Last access date and time of the file. DateTime dtLastAccesstime = File.GetLastAccessTime(sFilePath); But we are facing strange problem, the above call itself modifies the Last access time. So effectively we are getting current time as last access time. 回答1: You may find this post useful, in particular: Starting in Windows Vista, maintaining the last-access time is disabled by default. Which means that nowadays most operating systems won't maintain the last

File last access time on Android

百般思念 提交于 2019-12-07 09:48:26
问题 Is there a way to get lastAccess time for a file in Android. I know how to do it using java nio.file package, however, Android's support for java 7 is very limited and does not include the file package. I am not interested in lastModified, only lastAccessed, as I would like to delete the oldest read files. 回答1: if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP) { StructStat stat = null; try { stat = Os.stat("/sdcard/Pictures/abc.jpg"); // File path here } catch

Directory.GetFiles keeping the last access time

拈花ヽ惹草 提交于 2019-12-06 07:36:50
问题 It appears that Directory.GetFiles() in C# modifies the Last access date of a file. I've googled for hours and can't seem to find a work around for this issue. Is there anyway to keep all the MAC (Modified, Accessed, Created) attributes of a file? I'm using Directory.GetDirectories(), Directory.GetFiles(), and FileInfo. Also, the fi.LastAccessTime is giving strange results -- the date is correct, however, the time is off by 2 minutes, or a few hours. Time of function execution: 10/31/2008 8

File last access time on Android

不想你离开。 提交于 2019-12-05 17:19:35
Is there a way to get lastAccess time for a file in Android. I know how to do it using java nio.file package, however, Android's support for java 7 is very limited and does not include the file package. I am not interested in lastModified, only lastAccessed, as I would like to delete the oldest read files. if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP) { StructStat stat = null; try { stat = Os.stat("/sdcard/Pictures/abc.jpg"); // File path here } catch (ErrnoException e) { e.printStackTrace(); } long t2 = stat.st_atime *1000L; Calendar calendar = Calendar

Get the Last Access Time for a File

久未见 提交于 2019-11-27 08:54:37
I know that using File object we can get the last modified time for a File (i.e. File.lastModified() ). But, my requirement is to get the last accessed time for a File in Java. How do I get it? You will need to use the new file I/O API (NIO2) which comes with Java 7. It has a method lastAccessTime() for reading the last access time. Here is a usage example: Path file = ... BasicFileAttributes attrs = Files.readAttributes(file, BasicFileAttributes.class); FileTime time = attrs.lastAccessTime(); For more information see Managing Metadata in the Java Tutorial. You can't do it with plain Java, you