Gphoto2::FileSystem Class Reference

Represents a storage medium on the device. More...

Collaboration diagram for Gphoto2::FileSystem:

Collaboration graph
[legend]

Public Member Functions

bool CanUpload (File file)
 True if the file can fit on this filesystem.
bool Contains (string directory)
 Checks to see if the given directory exists on the filesystem.
bool Contains (string directory, string filename)
 Checks to see if the given file exists in the given directory.
bool Contains (File file)
int Count ()
 Counts the number of files in the base directory.
int Count (string directory)
 Counts the number of files in the specified directory.
int Count (string directory, bool recursive)
 Counts the number of files in the specified directory and subdirectories (if recursive).
void CreateDirectory (string path)
 Creates the supplied path on the device if it doesn't already exist.
void DeleteFile (string directory, string filename)
 Deletes the specified file from the specified directory.
void DeleteFile (File file)
 Deletes the specified file from the filesystem.
void DeleteAll (string folder)
 Deletes all the files in the specified path.
void DeleteAll (string folder, bool removeFolder)
 Deletes all the files in a specified path. If removeFolder is true, the folder is deleted if it is empty.
File GetFile (string directory, string filename)
 Gets the file at the specified path with the specified filename.
File[] GetFiles (string directory)
 Gets all the files at the specified path.
string[] GetFolders ()
 Lists all the folders found in the root directory.
string[] GetFolders (string directory)
 Lists all the folders found at the specified path.
File Upload (File file, string directory)
 Uploads the specified file into the specified path.
File Upload (File file, string directory, string filename)
 Uploads the specified file into the specified path saving it with the specified filename.

Static Public Member Functions

static string CombinePath (string path1, string path2)
 Combines paths in the correct format to be used to access files on the filesystem.

Properties

bool CanDelete [get]
bool CanRead [get]
bool CanWrite [get]
long Capacity [get]
string Description [get]
long FreeSpace [get]
string Label [get]
long UsedSpace [get]

Detailed Description

Represents a storage medium on the device.


Member Function Documentation

bool Gphoto2::FileSystem::CanUpload ( File  file  )  [inline]

True if the file can fit on this filesystem.

Parameters:
file The file to check if it can be uploaded A File
Returns:
A System.Boolean True if the file fits

bool Gphoto2::FileSystem::Contains ( string  directory  )  [inline]

Checks to see if the given directory exists on the filesystem.

Parameters:
directory The directory to check if it exists. A null value is treated as an empty string, which means the base directory. A System.String
Returns:
A System.Boolean

bool Gphoto2::FileSystem::Contains ( string  directory,
string  filename 
) [inline]

Checks to see if the given file exists in the given directory.

Parameters:
directory The directory where the file should be A System.String
filename The name of the file A System.String
Returns:
True if the file exists in the given directory, false if the directory doesn't exist or if the file doesn't exist. A System.Boolean

int Gphoto2::FileSystem::Count (  )  [inline]

Counts the number of files in the base directory.

Returns:
The number of files A System.Int32

int Gphoto2::FileSystem::Count ( string  directory  )  [inline]

Counts the number of files in the specified directory.

Parameters:
directory The directory to count the number of files in A System.String
Returns:
The number of files A System.Int32

int Gphoto2::FileSystem::Count ( string  directory,
bool  recursive 
) [inline]

Counts the number of files in the specified directory and subdirectories (if recursive).

Parameters:
directory The directory to count the number of files in A System.String
recursive True if files in all subdirectories should be counted too A System.Boolean
Returns:
The number of files A System.Int32

void Gphoto2::FileSystem::CreateDirectory ( string  path  )  [inline]

Creates the supplied path on the device if it doesn't already exist.

Parameters:
path The path to create A System.String

void Gphoto2::FileSystem::DeleteFile ( string  directory,
string  filename 
) [inline]

Deletes the specified file from the specified directory.

Parameters:
directory The directory to delete the file from (can be null) A System.String
filename The name of the file to delete A System.String

void Gphoto2::FileSystem::DeleteFile ( File  file  )  [inline]

Deletes the specified file from the filesystem.

Parameters:
file The file to delete A File

void Gphoto2::FileSystem::DeleteAll ( string  folder  )  [inline]

Deletes all the files in the specified path.

Parameters:
path The path to delete all the files in A System.String

void Gphoto2::FileSystem::DeleteAll ( string  folder,
bool  removeFolder 
) [inline]

Deletes all the files in a specified path. If removeFolder is true, the folder is deleted if it is empty.

Parameters:
folder The path to delete all the files in A System.String
removeFolder True if the folder should be removed A System.Boolean

File Gphoto2::FileSystem::GetFile ( string  directory,
string  filename 
) [inline]

Gets the file at the specified path with the specified filename.

Parameters:
directory The path to check for the file at A System.String
filename The name of the file to get A System.String
Returns:
A file object representing the file A File

File [] Gphoto2::FileSystem::GetFiles ( string  directory  )  [inline]

Gets all the files at the specified path.

Parameters:
directory The path to get the files at A System.String
Returns:
An array containing all the files found A File

string [] Gphoto2::FileSystem::GetFolders (  )  [inline]

Lists all the folders found in the root directory.

Returns:
An array containing all the folders A System.String

string [] Gphoto2::FileSystem::GetFolders ( string  directory  )  [inline]

Lists all the folders found at the specified path.

Parameters:
directory A System.String
Returns:
An array containing the names of all the directories A System.String

File Gphoto2::FileSystem::Upload ( File  file,
string  directory 
) [inline]

Uploads the specified file into the specified path.

Parameters:
file The file to upload A File
path The path where the file should be uploaded to A System.String
Returns:
An object representing the file on the camera A File

File Gphoto2::FileSystem::Upload ( File  file,
string  directory,
string  filename 
) [inline]

Uploads the specified file into the specified path saving it with the specified filename.

Parameters:
file The file to upload A File
directory The path where the file should be uploaded to A System.String
filename The filename to save the file as on the filesystem A System.String
Returns:
An object representing the file on the camera A File

static string Gphoto2::FileSystem::CombinePath ( string  path1,
string  path2 
) [inline, static]

Combines paths in the correct format to be used to access files on the filesystem.

Parameters:
path1 The first part of the path A System.String
path2 The second part of the path A System.String
Returns:
A string containing the second path appended to the first path A System.String


Property Documentation

bool Gphoto2::FileSystem::CanDelete [get]

True if the filesystem supports file deletion.

bool Gphoto2::FileSystem::CanRead [get]

True if the filesystem supports reading

bool Gphoto2::FileSystem::CanWrite [get]

True if the filesystem supports writing

long Gphoto2::FileSystem::Capacity [get]

The capacity of the filesystem in bytes

string Gphoto2::FileSystem::Description [get]

A verbose description of the filesystem

long Gphoto2::FileSystem::FreeSpace [get]

The free space of the filesystem in bytes

string Gphoto2::FileSystem::Label [get]

The label of the filesystem

long Gphoto2::FileSystem::UsedSpace [get]

The amount of space which has been used in bytes


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

Generated on Mon Feb 16 00:15:21 2009 for libgphoto2 Mono/.NET bindings (libgphoto2-sharp) API by  doxygen 1.5.5