Public Member Functions | |
long | Download (Stream stream) |
Reads the entire file and writes it to the supplied stream. | |
Stream | Download () |
Returns a stream which can be used to access the file. | |
void | Update () |
Synchronises the file metadata with the camera. | |
Protected Member Functions | |
File (Camera camera, FileSystem fs, string metadata, string path, string filename, bool local) | |
Creates a new File. | |
File (string path, string filename) | |
int | GetInt (string key) |
Searches the metadata for the specified key and returns the value as an integer. | |
string | GetString (string key) |
Searches the metadata for the specified key and returns the value as a string. | |
void | ParseMetadata (string metadata) |
Parses a metadata string (as returned by libgphoto2) into key/value pairs. | |
void | SetValue (string key, int value) |
Changes the value of the metadata to the specified value and sets the 'IsDirty' property to true if the value has changed. | |
void | SetValue (string key, string value) |
Changes the value of the metadata to the specified value and sets the 'IsDirty' property to true if the value has changed. | |
Properties | |
DateTime | DateAdded [get] |
DateTime | DateCreated [get] |
DateTime | DateModified [get] |
string | Filename [get] |
bool | IsDirty [get, set] |
DateTime | LastPlayed [get] |
bool | LocalFile [get] |
Dictionary< string, string > | Metadata [get] |
string | Path [get] |
int | Rating [get, set] |
long | Size [get, set] |
Gphoto2::File::File | ( | Camera | camera, | |
FileSystem | fs, | |||
string | metadata, | |||
string | path, | |||
string | filename, | |||
bool | local | |||
) | [inline, protected] |
Creates a new File.
camera | The camera this file is on (null if the file is a local file) A Camera | |
fs | The filesystem this file is on (null if the file is a local file) A FileSystem | |
metadata | The metadata for this file (string.Empty if there is none) A System.String | |
path | The path to this file A System.String | |
filename | The filename A System.String | |
local | True if the file is on the local filesystem, false if the file is on the camera A System.Boolean |
Stream Gphoto2::File::Download | ( | ) | [inline] |
Returns a stream which can be used to access the file.
stream | A Stream |
long Gphoto2::File::Download | ( | Stream | stream | ) | [inline] |
Reads the entire file and writes it to the supplied stream.
stream | A Stream |
int Gphoto2::File::GetInt | ( | string | key | ) | [inline, protected] |
Searches the metadata for the specified key and returns the value as an integer.
key | The key to get the value for A System.String |
string Gphoto2::File::GetString | ( | string | key | ) | [inline, protected] |
Searches the metadata for the specified key and returns the value as a string.
key | The key to get the value for A System.String |
void Gphoto2::File::ParseMetadata | ( | string | metadata | ) | [inline, protected] |
Parses a metadata string (as returned by libgphoto2) into key/value pairs.
metadata | The metadata string returned by libgphoto2 A System.String |
void Gphoto2::File::SetValue | ( | string | key, | |
string | value | |||
) | [inline, protected] |
Changes the value of the metadata to the specified value and sets the 'IsDirty' property to true if the value has changed.
key | The key to change the value of A System.String | |
value | The new value. If the value is null, it is treated as string.Empty A System.String |
void Gphoto2::File::SetValue | ( | string | key, | |
int | value | |||
) | [inline, protected] |
Changes the value of the metadata to the specified value and sets the 'IsDirty' property to true if the value has changed.
key | The key to change the value of A System.String | |
value | The new value A System.Int32 |
void Gphoto2::File::Update | ( | ) | [inline] |
Synchronises the file metadata with the camera.
DateTime Gphoto2::File::DateAdded [get] |
The date when the file was added to the device
DateTime Gphoto2::File::DateCreated [get] |
The date when the file was created
DateTime Gphoto2::File::DateModified [get] |
The date the file was last modified on
string Gphoto2::File::Filename [get] |
The name of the file
bool Gphoto2::File::IsDirty [get, set] |
True if the metadata has been changed and needs to be syncronised with the device
DateTime Gphoto2::File::LastPlayed [get] |
The date when the file was last played
bool Gphoto2::File::LocalFile [get] |
True if the file is on the local filesystem, false if the file is on the MTP device
Dictionary<string, string> Gphoto2::File::Metadata [get] |
A list of key/value pairs representing the metadata stored for the file
string Gphoto2::File::Path [get] |
The path to the file
int Gphoto2::File::Rating [get, set] |
The rating of the file
long Gphoto2::File::Size [get, set] |
The size of the file in bytes