TabFS icon indicating copy to clipboard operation
TabFS copied to clipboard

tab creation time as file ctime

Open vu3rdd opened this issue 4 years ago • 3 comments

First of all, tabfs is great! Thanks for this wonderful project.

I don't know if browsers provide an API to query the tab creation time. It would be nice if the file ctime reflects the tab creation time. At the moment, the file ctime/mtime etc are not being set (and shows Unix epoch Jan 1 1970).

I am imagining a situation where a user can do operations like deleting all tabs older than a date or something of that sort..

vu3rdd avatar Jan 04 '21 02:01 vu3rdd

Yeah, I think this would be great. I don't think there is an API for it, although I could be wrong -- I make a note about this here (added emphasis):

for a lot of things in the extension API, the browser can notify you of updates but there's no apparent way to query the full current state. so we'd need to sit in a lot of these places from the beginning and accumulate the incoming events to know, like, the last time a tab was updated, or the list of scripts currently running on a tab

If there is an extension API (or if it can be done through a Web page-side API with injected JS?), or if we do set up that time accumulation ourselves, it should be pretty easy to add the ctime to getattr in the code.

I think that you could do some cool subtleties, where the ctime is the time the tab was created and the mtime is the time of last navigation on that tab. (and I guess that would apply to both by-id/* and by-title/*. maybe last-focused has mtime based on the time you focused on that tab?)

osnr avatar Jan 04 '21 02:01 osnr

Related: #21

jtagcat avatar Jan 04 '21 09:01 jtagcat

There is a lastAccessed field in the Tab object. I don't see anything else in there related to creation/modification time.

vu3rdd avatar Jan 04 '21 09:01 vu3rdd