Learn R Programming

R.filesets (version 2.15.1)

GenericDataFile: The abstract GenericDataFile class

Description

Package: R.filesets
Class GenericDataFile

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

Directly known subclasses:
ChecksumFile, GenericTabularFile, RDataFile, RdsFile, TabularTextFile

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:

compareChecksumCompares the file checksum with the value of the checksum file.
equalsChecks if a file equals another.
getChecksumGets the checksum of a file.
getChecksumFile-
getExtensionGets the filename extension.
getFileSizeGets the size of a file.
getFileTypeGets the file type of a file.
getFilenameGets the filename of the file.
getPathGets the path (directory) of the file.
getPathnameGets the pathname of the file.
is.na-
isFileChecks if this is an existing file.
validateChecksumAsserts that the file checksum matches the one of the checksum file.
writeChecksumWrite 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

Henrik Bengtsson

See Also

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