AWS SDK for .NET Documentation
S3FileInfo Class
AmazonAmazon.S3.IOS3FileInfo Did this page help you?   Yes   No    Tell us about it...
Mimics the System.IO.FileInfo for a file in S3. It exposes properties and methods manipulating files in S3.
Declaration Syntax
C#
public sealed class S3FileInfo : IS3FileSystemInfo
Members
All MembersConstructorsMethodsProperties



IconMemberDescription
S3FileInfo(AmazonS3, String, String)
Initialize a new instance of the S3FileInfo class for the specified S3 bucket and S3 object key.

CopyFromLocal(String)
Copies the file from the local file system to S3. If the file already exists in S3 than an ArgumentException is thrown.

CopyFromLocal(String, Boolean)
Copies the file from the local file system to S3. If the file already exists in S3 and overwrite is set to false than an ArgumentException is thrown.

CopyTo(String, String)
Copies this file's content to the file indicated by the S3 bucket and object key. If the file already exists in S3 than an ArgumentException is thrown.

CopyTo(String, String, Boolean)
Copies this file's content to the file indicated by the S3 bucket and object key. If the file already exists in S3 and overwrite is set to false than an ArgumentException is thrown.

CopyTo(S3DirectoryInfo)
Copies this file to the target directory. If the file already exists in S3 than an ArgumentException is thrown.

CopyTo(S3DirectoryInfo, Boolean)
Copies this file to the target directory. If the file already exists in S3 and overwrite is set to false than an ArgumentException is thrown.

CopyTo(S3FileInfo)
Copies this file to the location indicated by the passed in S3FileInfo. If the file already exists in S3 than an ArgumentException is thrown.

CopyTo(S3FileInfo, Boolean)
Copies this file to the location indicated by the passed in S3FileInfo. If the file already exists in S3 and overwrite is set to false than an ArgumentException is thrown.

CopyToLocal(String)
Copies from S3 to the local file system. If the file already exists on the local file system than an ArgumentException is thrown.

CopyToLocal(String, Boolean)
Copies from S3 to the local file system. If the file already exists on the local file system and overwrite is set to false than an ArgumentException is thrown.

Create()()()()
Returns a Stream that can be used to write data to S3. The content is persisted to S3 once the Stream is closed.

CreateText()()()()
Returns a StreamWriter that can be used to write data to S3. The content is persisted to S3 once the StreamWriter is closed.

Delete()()()()
Deletes the from S3.

Directory
Returns the parent S3DirectoryInfo.

DirectoryName
The full name of parent directory.

Equals(Object)
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Exists
Checks S3 if the file exists in S3 and return true if it does.

Extension
Gets the file's extension.

FullName
Returns the full path including the bucket.

GetHashCode()()()()
Serves as a hash function for a particular type.
(Inherited from Object.)
GetType()()()()
Gets the type of the current instance.
(Inherited from Object.)
LastWriteTime
Returns the last time the file was modified.

LastWriteTimeUtc
Returns the last time the fule was modified in UTC.

Length
Returns the content length of the file.

MoveFromLocal(String)
Moves the file from the local file system to S3 in this directory. If the file already exists in S3 than an ArgumentException is thrown.

MoveFromLocal(String, Boolean)
Moves the file from the local file system to S3 in this directory. If the file already exists in S3 and overwrite is set to false than an ArgumentException is thrown.

MoveTo(String, String)
Moves the file to a a new location in S3.

MoveTo(S3DirectoryInfo)
Moves the file to a a new location in S3.

MoveTo(S3FileInfo)
Moves the file to a a new location in S3.

MoveToLocal(String)
Moves the file from S3 to the local file system in the location indicated by the path parameter.

Name
Returns the file name without its directory name.

OpenRead()()()()
Returns a Stream for reading the contents of the file.

OpenText()()()()
Returns a StreamReader for reading the contents of the file.

OpenWrite()()()()
Returns a Stream for writing to S3. If the file already exists it will be overwritten.

Replace(String, String, String, String)
Replaces the destination file with the content of this file and then deletes the orignial file. If a backup location is specifed then the content of destination file is backup to it.

Replace(S3DirectoryInfo, S3DirectoryInfo)
Replaces the destination file with the content of this file and then deletes the orignial file. If a backupDir is specifed then the content of destination file is backup to it.

Replace(S3FileInfo, S3FileInfo)
Replaces the destination file with the content of this file and then deletes the orignial file. If a backupFile is specifed then the content of destination file is backup to it.

ReplaceLocal(String, String)
Replaces the content of the destination file on the local file system with the content from this file from S3. If a backup file is specified then the content of the destination file is backup to it.

ToString()()()() (Overrides Object.ToString()()()().)
Type
Returns the type of file system element.

Inheritance Hierarchy
Object
S3FileInfo

Assembly: AWSSDK (Module: AWSSDK) Version: 1.5.60.0 (1.5.60.0)