![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
abstract-file
Advanced tools
It can be used on any virtual file system, and stream supports. Inspired by vinyl. Try to keep compatibility with vinyl.
AbstractFile.fs = fs
fs.cwd = process.cwd
the File and Folder implementation are in the custom-file package.
path
(File|String): the file path. it will be internally stored as absolute path always.
path
attribute if it's an file object.cwd
(String): the current working directroy.base
(String): the base directory. used to calc the relative path.
the default is cwd
if it's empty.history
(ArrayOf String): the history of the path changes.stat
(Stat): the file stats object. the isDirectory()
method be used.contents
(String|Buffer|ArrayOf(File)|Stream): the contents of the file.
File
object or a read-dir-stream if the file is a folder.skipSize
(Integer): the skipped length from beginning of contents. used by getContent()
.
only for buffer.relative
(String): readonly. the relative path from path
to base
.dirname
(String): readonly. the dirname of the path
.basename
(String): readonly. the basename of the path
.constructor([aPath, ]aOptions[, done])
aPath
(String): the file path. it will be stored as absolute path always.aOptions
(Object):
path
(String): the same as the aPath
argument.cwd
(String): the current working directroy.base
(String): the base directory. used to calc the relative path.
the default is cwd
if it's empty.load
(Boolean): whether load file data(stat and contents). defaults to falseread
(Boolean): whether load file contents. defaults to false. only for load
is true.buffer
(Boolean): whether load file contents as buffer or stream, defaults to false.
only available for load
and read
both are true.text
(Boolean): whether load file contents as text, defaults to false.
only available for load
, read
and buffer
both are true.done
(Function): the callback function only available for load
is true.
loadSync
will be used if no done
function.load(aOptions, done)
: Asynchronous load file stat and content.
read
(Boolean): whether load file contents. defaults to false.buffer
(Boolean): whether load file contents as buffer or stream, defaults to false.
only available for read
is true.text
(Boolean): whether load file contents as text, defaults to false.
only available for read
and buffer
both are true.done
Function(err, content): the callback function. the content
only available when read
is trueloadSync(aOptions)
: Synchronous load file stat and content.
read
(Boolean): whether load file contents. defaults to false.buffer
(Boolean): whether load file contents as buffer or stream, defaults to false.
only available for read
is true.text
(Boolean): whether load file contents as text, defaults to false.
only available for read
and buffer
both are true.read
is trueloadContent(aOptions, done)
: Asynchronous load file contents.
buffer
(Boolean): whether load file contents as buffer or stream, defaults to false.text
(Boolean): whether load file contents as text, defaults to false.
only available for buffer
is true.done
Function(err, content): the callback function.loadContentSync(aOptions)
: Synchronous load file contents.
buffer
(Boolean): whether load file contents as buffer or stream, defaults to false.text
(Boolean): whether load file contents as text, defaults to false.
only available for buffer
is true.getContent(aOptions, done)
: Asynchronous get the file contents buffer, skipSize used.
only available for File(not for folder)
done
Function(err, content): the callback function.getContentSync(aOptions)
: Synchronous get the file contents buffer, skipSize used.
only available for File(not for folder)loadStat(aOptions, done)
: Asynchronous load file stats.
done
Function(err, stat): the callback function.loadStatSync(aOptions)
: Synchronous load file stats.
pipe(stream[, options])
: pipe it to the stream.
stream
(Writable Stream): The destination stream for writing data.options
(Object): Pipe options
end
(Boolean): End the writer when the reader ends. Default = truevalidate(aFile, raiseError=true)
: the aFile object whether is valid.isDirectory()
: whether is directory.isBuffer()
: whether contents is buffer.isStream()
: whether contents is stream.toString()
: return the path.these methods should be overrides:
MIT
FAQs
It can be used on any virtual file system, and stream supports.
The npm package abstract-file receives a total of 0 weekly downloads. As such, abstract-file popularity was classified as not popular.
We found that abstract-file demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.