Show / Hide Table of Contents

Class GoogleDriveClient

Google Drive REST API wrapper.

Inheritance
System.Object
GoogleDriveClient
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: NFX.IO.FileSystem.GoogleDrive.V2
Assembly: NFX.Web.dll
Syntax
public class GoogleDriveClient

Constructors

GoogleDriveClient(String, String)

Declaration
public GoogleDriveClient(string email, string certPath)
Parameters
Type Name Description
System.String email
System.String certPath

GoogleDriveClient(String, String, Int32, Int32)

Declaration
public GoogleDriveClient(string email, string certPath, int timeout, int attempts)
Parameters
Type Name Description
System.String email
System.String certPath
System.Int32 timeout
System.Int32 attempts

Methods

CreateDirectory(String, String)

Creates a directory

Declaration
public GoogleDriveHandle CreateDirectory(string parentId, string name)
Parameters
Type Name Description
System.String parentId
System.String name
Returns
Type Description
GoogleDriveHandle

CreateFile(String, String)

Creates a file

Declaration
public GoogleDriveHandle CreateFile(string parentId, string name)
Parameters
Type Name Description
System.String parentId
System.String name
Returns
Type Description
GoogleDriveHandle

CreateFile(String, String, Stream)

Creates a file

Declaration
public GoogleDriveHandle CreateFile(string parentId, string name, Stream stream)
Parameters
Type Name Description
System.String parentId
System.String name
System.IO.Stream stream
Returns
Type Description
GoogleDriveHandle

Delete(String)

Deletes an item

Declaration
public void Delete(string id)
Parameters
Type Name Description
System.String id

FileExists(String)

Checks whether the specified file exists

Declaration
public bool FileExists(string path)
Parameters
Type Name Description
System.String path
Returns
Type Description
System.Boolean

FolderExists(String)

Checks whether the specified folder exists

Declaration
public bool FolderExists(string path)
Parameters
Type Name Description
System.String path
Returns
Type Description
System.Boolean

GetDirectories(String, Boolean)

Returns directory names contained in the spicifed directory

Declaration
public IEnumerable<string> GetDirectories(string path, bool recursive)
Parameters
Type Name Description
System.String path
System.Boolean recursive
Returns
Type Description
System.Collections.Generic.IEnumerable<System.String>

GetFile(String, Stream)

Gets a file by ID

Declaration
public void GetFile(string id, Stream stream)
Parameters
Type Name Description
System.String id
System.IO.Stream stream

GetFiles(String, Boolean)

Returns files contained in the spicifed directory

Declaration
public IEnumerable<GoogleDriveHandle> GetFiles(string parentId, bool recursive)
Parameters
Type Name Description
System.String parentId
System.Boolean recursive
Returns
Type Description
System.Collections.Generic.IEnumerable<GoogleDriveHandle>

GetHandle(String)

Gets a handle for the specified file or folder.

Declaration
public GoogleDriveHandle GetHandle(string path)
Parameters
Type Name Description
System.String path
Returns
Type Description
GoogleDriveHandle

GetItemInfoById(String)

Declaration
public GoogleDriveHandle GetItemInfoById(string id)
Parameters
Type Name Description
System.String id
Returns
Type Description
GoogleDriveHandle

Rename(String, String)

Renames a file/folder by its ID

Declaration
public void Rename(string id, string name)
Parameters
Type Name Description
System.String id
System.String name

SetModifiedDate(String, DateTime)

Sets modification timestamp

Declaration
public void SetModifiedDate(string id, DateTime date)
Parameters
Type Name Description
System.String id
System.DateTime date

UpdateFile(String, Stream)

Updates content of a file by file ID

Declaration
public GoogleDriveHandle UpdateFile(string id, Stream stream)
Parameters
Type Name Description
System.String id
System.IO.Stream stream
Returns
Type Description
GoogleDriveHandle

Extension Methods

MiscUtils.NonNull<T>(T, Func<Exception>, String)
ObjectValueConversion.AsString(Object, String, ConvertErrorHandling)
ObjectValueConversion.AsNonNullOrEmptyString(Object)
ObjectValueConversion.AsLaconicConfig(Object, ConfigSectionNode, String, ConvertErrorHandling)
ObjectValueConversion.AsJSONConfig(Object, ConfigSectionNode, String, ConvertErrorHandling)
ObjectValueConversion.AsXMLConfig(Object, ConfigSectionNode, ConvertErrorHandling)
ObjectValueConversion.AsChar(Object, Char, ConvertErrorHandling)
ObjectValueConversion.AsNullableChar(Object, Nullable<Char>, ConvertErrorHandling)
ObjectValueConversion.AsByte(Object, Byte, ConvertErrorHandling)
ObjectValueConversion.AsNullableByte(Object, Nullable<Byte>, ConvertErrorHandling)
ObjectValueConversion.AsSByte(Object, SByte, ConvertErrorHandling)
ObjectValueConversion.AsNullableSByte(Object, Nullable<SByte>, ConvertErrorHandling)
ObjectValueConversion.AsShort(Object, Int16, ConvertErrorHandling)
ObjectValueConversion.AsNullableShort(Object, Nullable<Int16>, ConvertErrorHandling)
ObjectValueConversion.AsUShort(Object, UInt16, ConvertErrorHandling)
ObjectValueConversion.AsNullableUShort(Object, Nullable<UInt16>, ConvertErrorHandling)
ObjectValueConversion.AsInt(Object, Int32, ConvertErrorHandling)
ObjectValueConversion.AsNullableInt(Object, Nullable<Int32>, ConvertErrorHandling)
ObjectValueConversion.AsUInt(Object, UInt32, ConvertErrorHandling)
ObjectValueConversion.AsNullableUInt(Object, Nullable<UInt32>, ConvertErrorHandling)
ObjectValueConversion.AsLong(Object, Int64, ConvertErrorHandling)
ObjectValueConversion.AsNullableLong(Object, Nullable<Int64>, ConvertErrorHandling)
ObjectValueConversion.AsULong(Object, UInt64, ConvertErrorHandling)
ObjectValueConversion.AsNullableULong(Object, Nullable<UInt64>, ConvertErrorHandling)
ObjectValueConversion.AsDouble(Object, Double, ConvertErrorHandling)
ObjectValueConversion.AsNullableDouble(Object, Nullable<Double>, ConvertErrorHandling)
ObjectValueConversion.AsFloat(Object, Single, ConvertErrorHandling)
ObjectValueConversion.AsNullableFloat(Object, Nullable<Single>, ConvertErrorHandling)
ObjectValueConversion.AsDecimal(Object, Decimal, ConvertErrorHandling)
ObjectValueConversion.AsNullableDecimal(Object, Nullable<Decimal>, ConvertErrorHandling)
ObjectValueConversion.AsBool(Object, Boolean, ConvertErrorHandling)
ObjectValueConversion.AsNullableBool(Object, Nullable<Boolean>, ConvertErrorHandling)
ObjectValueConversion.AsGUID(Object, Guid, ConvertErrorHandling)
ObjectValueConversion.AsNullableGUID(Object, Nullable<Guid>, ConvertErrorHandling)
ObjectValueConversion.AsDateTime(Object)
ObjectValueConversion.AsDateTime(Object, DateTime, ConvertErrorHandling)
ObjectValueConversion.AsNullableDateTime(Object, Nullable<DateTime>, ConvertErrorHandling)
ObjectValueConversion.AsGDID(Object)
ObjectValueConversion.AsGDID(Object, GDID, ConvertErrorHandling)
ObjectValueConversion.AsNullableGDID(Object, Nullable<GDID>, ConvertErrorHandling)
ObjectValueConversion.AsGDIDSymbol(Object)
ObjectValueConversion.AsGDIDSymbol(Object, GDIDSymbol, ConvertErrorHandling)
ObjectValueConversion.AsNullableGDIDSymbol(Object, Nullable<GDIDSymbol>, ConvertErrorHandling)
ObjectValueConversion.AsTimeSpan(Object)
ObjectValueConversion.AsTimeSpan(Object, TimeSpan, ConvertErrorHandling)
ObjectValueConversion.AsNullableTimeSpan(Object, Nullable<TimeSpan>, ConvertErrorHandling)
ObjectValueConversion.AsEnum<TEnum>(Object, TEnum, ConvertErrorHandling)
ObjectValueConversion.AsNullableEnum<TEnum>(Object, Nullable<TEnum>, ConvertErrorHandling)
ObjectValueConversion.AsUri(Object, Uri, ConvertErrorHandling)
JSONExtensions.ToJSON(Object, JSONWritingOptions)
JSONExtensions.ToJSON(Object, TextWriter, JSONWritingOptions)
JSONExtensions.ToJSON(Object, Stream, JSONWritingOptions, Encoding)
ErlObject.ToErlObject(Object)
ErlObject.ToErlObject(Object, ErlTypeOrder, Boolean)
Back to top Copyright © 2006-2018 Agnicore Inc
Generated by DocFX