Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Autopsy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IRT
Autopsy
Commits
291e1565
Commit
291e1565
authored
7 years ago
by
William Schaefer
Browse files
Options
Downloads
Patches
Plain Diff
2885 Last Accessed time now sourced from last accessed attr instead of modified
parent
93ed39fe
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestCase.java
+7
-13
7 additions, 13 deletions
...thkit/autopsy/experimental/autoingest/AutoIngestCase.java
with
7 additions
and
13 deletions
Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestCase.java
+
7
−
13
View file @
291e1565
/*
* Autopsy Forensic Browser
*
* Copyright 2015 Basis Technology Corp.
* Copyright 2015
-2017
Basis Technology Corp.
* Contact: carrier <at> sleuthkit <dot> org
*
* Licensed under the Apache License, Version 2.0 (the "License");
...
...
@@ -39,7 +39,7 @@ class AutoIngestCase implements Comparable<AutoIngestCase> {
private
final
String
caseName
;
private
final
Path
metadataFilePath
;
private
final
Date
createDate
;
private
Date
last
Modfi
edDate
;
private
final
Date
last
Access
edDate
;
/**
* Constructs a representation of case created by automated ingest.
...
...
@@ -58,10 +58,10 @@ class AutoIngestCase implements Comparable<AutoIngestCase> {
}
if
(
null
!=
fileAttrs
)
{
createDate
=
new
Date
(
fileAttrs
.
creationTime
().
toMillis
());
last
Modfi
edDate
=
new
Date
(
fileAttrs
.
last
Modified
Time
().
toMillis
());
last
Access
edDate
=
new
Date
(
fileAttrs
.
last
Access
Time
().
toMillis
());
}
else
{
createDate
=
new
Date
();
last
Modfi
edDate
=
new
Date
();
last
Access
edDate
=
new
Date
();
}
}
...
...
@@ -94,19 +94,13 @@ Date getCreationDate() {
}
/**
* Gets the last accessed date for the case, defined as the last
modifi
ed
* Gets the last accessed date for the case, defined as the last
access
ed
* time of the case metadata file.
*
* @return The last accessed date.
*/
Date
getLastAccessedDate
()
{
try
{
BasicFileAttributes
fileAttrs
=
Files
.
readAttributes
(
metadataFilePath
,
BasicFileAttributes
.
class
);
lastModfiedDate
=
new
Date
(
fileAttrs
.
lastModifiedTime
().
toMillis
());
}
catch
(
IOException
ex
)
{
logger
.
log
(
Level
.
SEVERE
,
String
.
format
(
"Error reading file attributes of case metadata file in %s, lastModfiedDate time not updated"
,
caseDirectoryPath
),
ex
);
}
return
lastModfiedDate
;
return
this
.
lastAccessedDate
;
}
/**
...
...
@@ -162,7 +156,7 @@ public int hashCode() {
*/
@Override
public
int
compareTo
(
AutoIngestCase
other
)
{
return
-
this
.
last
Modfi
edDate
.
compareTo
(
other
.
getLastAccessedDate
());
return
-
this
.
last
Access
edDate
.
compareTo
(
other
.
getLastAccessedDate
());
}
/**
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment