JUCE: FileInputSource Class Reference

JUCE

Public Member Functions | List of all members
FileInputSource Class Reference
juce_core » streams

A type of InputSource that represents a normal file. More...

`#include <juce_FileInputSource.h>`

Inheritance diagram for FileInputSource:

## Public Member Functions
| FileInputSource (const File &file, bool useFileTimeInHashGeneration=false)
| Creates a FileInputSource for a file. More...
| ~FileInputSource () override
| Destructor. More...
InputStream * | createInputStream () override
| Returns a new InputStream to read this item. More...
InputStream * | createInputStreamFor (const String &relatedItemPath) override
| Returns a new InputStream to read an item, relative. More...
int64 | hashCode () const override
| Returns a hash code that uniquely represents this item. More...
Public Member Functions inherited from InputSource
| InputSource ()=default
virtual | ~InputSource ()=default
| Destructor. More...
virtual InputStream * | createInputStream ()=0
| Returns a new InputStream to read this item. More...
virtual InputStream * | createInputStreamFor (const String &relatedItemPath)=0
| Returns a new InputStream to read an item, relative. More...
virtual int64 | hashCode () const =0
| Returns a hash code that uniquely represents this item. More...

## Detailed Description

A type of InputSource that represents a normal file.

See also
  InputSource

## Constructor & Destructor Documentation

## ◆ FileInputSource()

FileInputSource::FileInputSource | ( | const File & | file,
|  | bool | useFileTimeInHashGeneration = `false`
| ) |  |

Creates a FileInputSource for a file.

If the useFileTimeInHashGeneration parameter is true, then this object's hashCode() method will incorporate the file time into its hash code; if false, only the file name will be used for the hash.

## ◆ ~FileInputSource()

FileInputSource::~FileInputSource | ( |  | ) |
| override

Destructor.

## Member Function Documentation

## ◆ createInputStream()

InputStream * FileInputSource::createInputStream | ( |  | ) |
| overridevirtual

Returns a new InputStream to read this item.

Returns
  an inputstream that the caller will delete, or nullptr if the filename isn't found.

Implements InputSource.

## ◆ createInputStreamFor()

InputStream * FileInputSource::createInputStreamFor | ( | const String & | relatedItemPath | ) |
| overridevirtual

Returns a new InputStream to read an item, relative.

Parameters

  relatedItemPath | the relative pathname of the resource that is required

Returns
  an inputstream that the caller will delete, or nullptr if the item isn't found.

Implements InputSource.

## ◆ hashCode()

int64 FileInputSource::hashCode | ( |  | ) | const
| overridevirtual

Returns a hash code that uniquely represents this item.

Implements InputSource.

The documentation for this class was generated from the following file:

- juce_FileInputSource.h