Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

GenericDataFile

The abstract GenericDataFile class


Description

Package: R.filesets
Class GenericDataFile

Object
~~|
~~+--FullNameInterface
~~~~~~~|
~~~~~~~+--GenericDataFile

public abstract static class GenericDataFile
extends FullNameInterface

A GenericDataFile is an object referring to a data file on a file system. Note that this class is abstract and can not be instantiated, but instead you have to use one of the subclasses or the generic *fromFile() method.

Usage

GenericDataFile(filename=NULL, path=NULL, mustExist=!is.na(filename), ...,
  .onUnknownArgs=c("error", "warning", "ignore"))

Arguments

filename

The filename of the file.

path

An optional path to the file.

mustExist

If TRUE, an exception is thrown if the file does not exists, otherwise not.

...

Not used.

.onUnknownArgs

A character string specifying what should occur if there are unknown arguments in ....

Fields and Methods

Methods:

compareChecksum Compares the file checksum with the value of the checksum file.
equals Checks if a file equals another.
getChecksum Gets the checksum of a file.
getChecksumFile -
getExtension Gets the filename extension.
getFileSize Gets the size of a file.
getFileType Gets the file type of a file.
getFilename Gets the filename of the file.
getPath Gets the path (directory) of the file.
getPathname Gets the pathname of the file.
is.na -
isFile Checks if this is an existing file.
validateChecksum Asserts that the file checksum matches the one of the checksum file.
writeChecksum Write the file checksum to a checksum file.

Methods inherited from FullNameInterface:
appendFullNameTranslator, appendFullNameTranslatorByNULL, appendFullNameTranslatorByTabularTextFile, appendFullNameTranslatorByTabularTextFileSet, appendFullNameTranslatorBycharacter, appendFullNameTranslatorBydata.frame, appendFullNameTranslatorByfunction, appendFullNameTranslatorBylist, clearFullNameTranslator, clearListOfFullNameTranslators, getDefaultFullName, getFullName, getFullNameTranslator, getListOfFullNameTranslators, getName, getTags, hasTag, hasTags, resetFullName, setFullName, setFullNameTranslator, setListOfFullNameTranslators, setName, setTags, updateFullName

Methods inherited from Object:
$, $<-, [[, [[<-, as.character, attach, attachLocally, clearCache, clearLookupCache, clone, detach, equals, extend, finalize, getEnvironment, getFieldModifier, getFieldModifiers, getFields, getInstantiationTime, getStaticInstance, hasField, hashCode, ll, load, names, objectSize, print, save

Filename convention

The filename of an GenericDataFile is structured as follows:

  • filename: "sample001,a,b,c.CEL" (this follows the R convention, but not the Unix convention)

  • fullname: "sample001,a,b,c"

  • name: "sample001"

  • tags: c("a", "b", "c")

  • extension: "CEL"

Author(s)

Henrik Bengtsson

See Also

An object of this class is typically part of an GenericDataFileSet.


R.filesets

Easy Handling of and Access to Files Organized in Structured Directories

v2.14.0
LGPL (>= 2.1)
Authors
Henrik Bengtsson [aut, cre, cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.