Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F104185055
reader.js
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Fri, Mar 7, 02:04
Size
1 KB
Mime Type
text/x-c++
Expires
Sun, Mar 9, 02:04 (2 d)
Engine
blob
Format
Raw Data
Handle
24759690
Attached To
rOACCT Open Access Compliance Check Tool (OACCT)
reader.js
View Options
"use strict"
;
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
const
path
=
require
(
"path"
);
const
fsStat
=
require
(
"@nodelib/fs.stat"
);
const
utils
=
require
(
"../utils"
);
class
Reader
{
constructor
(
_settings
)
{
this
.
_settings
=
_settings
;
this
.
_fsStatSettings
=
new
fsStat
.
Settings
({
followSymbolicLink
:
this
.
_settings
.
followSymbolicLinks
,
fs
:
this
.
_settings
.
fs
,
throwErrorOnBrokenSymbolicLink
:
this
.
_settings
.
followSymbolicLinks
});
}
_getFullEntryPath
(
filepath
)
{
return
path
.
resolve
(
this
.
_settings
.
cwd
,
filepath
);
}
_makeEntry
(
stats
,
pattern
)
{
const
entry
=
{
name
:
pattern
,
path
:
pattern
,
dirent
:
utils
.
fs
.
createDirentFromStats
(
pattern
,
stats
)
};
if
(
this
.
_settings
.
stats
)
{
entry
.
stats
=
stats
;
}
return
entry
;
}
_isFatalError
(
error
)
{
return
!
utils
.
errno
.
isEnoentCodeError
(
error
)
&&
!
this
.
_settings
.
suppressErrors
;
}
}
exports
.
default
=
Reader
;
Event Timeline
Log In to Comment