AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
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.
Namespace: Amazon.S3.IO
Assembly: AWSSDK.S3.dll
Version: 3.x.y.z
public sealed class S3DirectoryInfo IS3FileSystemInfo
The S3DirectoryInfo type exposes the following members
Name | Description | |
---|---|---|
S3DirectoryInfo(IAmazonS3, string) |
Initialize a new instance of the S3DirectoryInfo class for the specified S3 bucket. |
|
S3DirectoryInfo(IAmazonS3, string, string) |
Initialize a new instance of the S3DirectoryInfo class for the specified S3 bucket and S3 object key. |
Name | Type | Description | |
---|---|---|---|
Bucket | Amazon.S3.IO.S3DirectoryInfo |
The S3DirectoryInfo for the root of the S3 bucket. |
|
Exists | System.Boolean |
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. |
|
FullName | System.String |
The full path of the directory including bucket name. |
|
LastWriteTime | System.DateTime |
Returns the last write time of the the latest file written to the directory. |
|
LastWriteTimeUtc | System.DateTime |
UTC converted version of LastWriteTime. |
|
Name | System.String |
Returns the name of the folder. |
|
Parent | Amazon.S3.IO.S3DirectoryInfo |
Return the S3DirectoryInfo of the parent directory. |
|
Root | Amazon.S3.IO.S3DirectoryInfo |
Returns the S3DirectroyInfo for the S3 account. |
|
Type | Amazon.S3.IO.FileSystemType |
Returns the type of file system element. |
Name | Description | |
---|---|---|
CopyFromLocal(string) |
Copies files from the local file system to S3 in this directory. Sub directories are copied as well. |
|
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. |
|
CopyTo(string, string) |
Copies the files from this directory to the target directory specified by the bucket and object key. |
|
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. |
|
CopyTo(S3DirectoryInfo) |
Copies the files from this directory to the target directory. |
|
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. |
|
CopyToLocal(string) |
Copies the files from the S3 directory to the local file system in the location indicated by the path parameter. |
|
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. |
|
Create() |
Creates the directory in S3. If no object key was specified when creating the S3DirectoryInfo then the bucket will be created. |
|
CreateSubdirectory(string) |
Creates a sub directory inside the instance of S3DirectoryInfo. |
|
Delete() |
Deletes all the files in this directory as well as this directory. |
|
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. |
|
EnumerateDirectories() |
Enumerate the sub directories of this directory. |
|
EnumerateDirectories(string) |
Enumerate the sub directories of this directory. |
|
EnumerateDirectories(string, SearchOption) |
Enumerate the sub directories of this directory. |
|
EnumerateFiles() |
Enumerate the files of this directory. |
|
EnumerateFiles(string) |
Enumerate the sub directories of this directory. |
|
EnumerateFiles(string, SearchOption) |
Enumerate the files of this directory. |
|
EnumerateFileSystemInfos() |
Enumerate the files of this directory. |
|
EnumerateFileSystemInfos(string) |
Enumerate the files of this directory. |
|
EnumerateFileSystemInfos(string, SearchOption) |
Enumerate the files of this directory. |
|
GetDirectories() |
Returns an array of S3DirectoryInfos for the directories in this directory. |
|
GetDirectories(string) |
Returns an array of S3DirectoryInfos for the directories in this directory. |
|
GetDirectories(string, SearchOption) |
Returns an array of S3DirectoryInfos for the directories in this directory. |
|
GetDirectory(string) |
Returns the S3DirectoryInfo for the specified sub directory. |
|
GetFile(string) |
Returns the S3FileInfo for the specified file. |
|
GetFiles() |
Returns an array of S3FileInfos for the files in this directory. |
|
GetFiles(string) |
Returns an array of S3FileInfos for the files in this directory. |
|
GetFiles(string, SearchOption) |
Returns an array of S3FileInfos for the files in this directory. |
|
GetFileSystemInfos() |
Returns an array of IS3FileSystemInfos for the files in this directory. |
|
GetFileSystemInfos(string) |
Returns an array of IS3FileSystemInfos for the files in this directory. |
|
GetFileSystemInfos(string, SearchOption) |
Returns an array of IS3FileSystemInfos for the files in this directory. |
|
MoveFromLocal(string) |
Moves files from the local file system to S3 in this directory. Sub directories are moved as well. |
|
MoveTo(string, string) |
Moves the directory to the target directory specified by the bucket and object key. |
|
MoveTo(S3DirectoryInfo) |
Moves the directory to the target S3 directory. |
|
MoveToLocal(string) |
Moves the files from the S3 directory to the local file system in the location indicated by the path parameter. |
.NET Framework:
Supported in: 4.5 and newer, 3.5