R: The abstract GenericDataFile class

GenericDataFile {R.filesets} | R Documentation

## 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 refering to a data file on a file system. Note that this class is abstract and can not be instanciated, 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`.

[Package R.filesets version 2.11.0 Index]