S3DirectoryInfo Class

.NET Framework 3.5
 
 
 
Did this page help you?  Yes  No   Tell us about it...
Mimics the System.IO.DirectoryInfo for a virtual directory in S3. It exposes properties and methods for enumerating directories and files as well as methods manipulate directories.

Inheritance Hierarchy

System.Object
  Amazon.S3.IO.S3DirectoryInfo

Namespace: Amazon.S3.IO
Assembly: AWSSDK.dll
Version: 2.0.0.3

Syntax

C#
public sealed class S3DirectoryInfo : Object
         IS3FileSystemInfo

The S3DirectoryInfo type exposes the following members

Constructors

  Name Description
Public Method S3DirectoryInfo(IAmazonS3, string) Initialize a new instance of the S3DirectoryInfo class for the specified S3 bucket.
Public Method S3DirectoryInfo(IAmazonS3, string, string) Initialize a new instance of the S3DirectoryInfo class for the specified S3 bucket and S3 object key.

Properties

  Name Description
Public Property Bucket The S3DirectoryInfo for the root of the S3 bucket.
Public Property Exists Checks with S3 to see if the directory exists and if so returns true. Due to Amazon S3's eventual consistency model this property can return false for newly created buckets.
Public Property FullName The full path of the directory including bucket name.
Public Property LastWriteTime Returns the last write time of the the latest file written to the directory.
Public Property LastWriteTimeUtc UTC converted version of LastWriteTime.
Public Property Name Returns the name of the folder.
Public Property Parent Return the S3DirectoryInfo of the parent directory.
Public Property Root Returns the S3DirectroyInfo for the S3 account.
Public Property Type Returns the type of file system element.

Methods

  Name Description
Public Method CopyFromLocal(string) Copies files from the local file system to S3 in this directory. Sub directories are copied as well.
Public Method CopyFromLocal(string, DateTime) Copies files from the local file system to S3 in this directory. Sub directories are copied as well. Only files that have been modified since the changesSince property will be copied.
Public Method CopyTo(string, string) Copies the files from this directory to the target directory specified by the bucket and object key.
Public Method CopyTo(string, string, DateTime) Copies the files from this directory to the target directory specified by the bucket and object key. Only files that have changed since the changeSince date will be copied.
Public Method CopyTo(S3DirectoryInfo) Copies the files from this directory to the target directory.
Public Method CopyTo(S3DirectoryInfo, DateTime) Copies the files from this directory to the target directory. Only files that have changed since the changeSince date will be copied.
Public Method CopyToLocal(string) Copies the files from the S3 directory to the local file system in the location indicated by the path parameter.
Public Method CopyToLocal(string, DateTime) Copies the files from the S3 directory to the local file system in the location indicated by the path parameter. Only files that have been modified since the changesSince property will be copied.
Public Method Create() Creates the directory in S3. If no object key was specified when creating the S3DirectoryInfo then the bucket will be created.
Public Method CreateSubdirectory(string) Creates a sub directory inside the instance of S3DirectoryInfo.
Public Method Delete() Deletes all the files in this directory as well as this directory.
Public Method Delete(bool) Deletes all the files in this directory as well as this directory. If recursive is set to true then all sub directories will be deleted as well.
Public Method EnumerateDirectories() Enumerate the sub directories of this directory.
Public Method EnumerateDirectories(string) Enumerate the sub directories of this directory.
Public Method EnumerateDirectories(string, SearchOption) Enumerate the sub directories of this directory.
Public Method EnumerateFiles() Enumerate the files of this directory.
Public Method EnumerateFiles(string) Enumerate the sub directories of this directory.
Public Method EnumerateFiles(string, SearchOption) Enumerate the files of this directory.
Public Method EnumerateFileSystemInfos() Enumerate the files of this directory.
Public Method EnumerateFileSystemInfos(string) Enumerate the files of this directory.
Public Method EnumerateFileSystemInfos(string, SearchOption) Enumerate the files of this directory.
Public Method GetDirectories() Returns an array of S3DirectoryInfos for the directories in this directory.
Public Method GetDirectories(string) Returns an array of S3DirectoryInfos for the directories in this directory.
Public Method GetDirectories(string, SearchOption) Returns an array of S3DirectoryInfos for the directories in this directory.
Public Method GetDirectory(string) Returns the S3DirectoryInfo for the specified sub directory.
Public Method GetFile(string) Returns the S3FileInfo for the specified file.
Public Method GetFiles() Returns an array of S3FileInfos for the files in this directory.
Public Method GetFiles(string) Returns an array of S3FileInfos for the files in this directory.
Public Method GetFiles(string, SearchOption) Returns an array of S3FileInfos for the files in this directory.
Public Method GetFileSystemInfos() Returns an array of IS3FileSystemInfos for the files in this directory.
Public Method GetFileSystemInfos(string) Returns an array of IS3FileSystemInfos for the files in this directory.
Public Method GetFileSystemInfos(string, SearchOption) Returns an array of IS3FileSystemInfos for the files in this directory.
Public Method MoveFromLocal(string) Moves files from the local file system to S3 in this directory. Sub directories are moved as well.
Public Method MoveTo(string, string) Moves the files from this directory to the target directory specified by the bucket and object key.
Public Method MoveTo(S3DirectoryInfo) Moves the files from this directory to the target S3 directory.
Public Method MoveToLocal(string) Moves the files from the S3 directory to the local file system in the location indicated by the path parameter.

Version Information

.NET Framework:
Supported in: 4.5, 4.0, 3.5