Search Results for

Show / Hide Table of Contents

# Class PersistedFile

Represents a file that has been marked as persisted and should survive temporary cleanup.

##### Inheritance

object
PersistedFile

##### Inherited Members

object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()

###### Namespace: CuteWebUI

###### Assembly: AjaxUploader.dll

##### Syntax

    public class PersistedFile

### Properties

#### FileGuid

Gets the upload GUID.

##### Declaration

    public Guid FileGuid { get; }

##### Property Value

Type | Description
--- | ---
Guid |

#### FileName

Gets the original file name.

##### Declaration

    public string FileName { get; }

##### Property Value

Type | Description
--- | ---
string |

#### FileSize

Gets the file size in bytes.

##### Declaration

    public int FileSize { get; }

##### Property Value

Type | Description
--- | ---
int |

#### ProviderSupportFS

Gets whether the provider exposes file-system paths.

##### Declaration

    public bool ProviderSupportFS { get; }

##### Property Value

Type | Description
--- | ---
bool |

### Methods

#### CopyTo(string)

Copies the persisted file to a new file-system path.

##### Declaration

    public void CopyTo(string newpath)

##### Parameters

Type | Name | Description
--- | --- | ---
string | newpath |

#### Delete()

Deletes the persisted file.

##### Declaration

    public void Delete()

#### GetTempFilePath()

Gets the temporary file path when supported by the provider.

##### Declaration

    public string GetTempFilePath()

##### Returns

Type | Description
--- | ---
string |

#### MoveTo(string)

Moves the persisted file to a new file-system path.

##### Declaration

    public void MoveTo(string newpath)

##### Parameters

Type | Name | Description
--- | --- | ---
string | newpath |

#### OpenStream()

Opens a readable stream for the persisted file.

##### Declaration

    public Stream OpenStream()

##### Returns

Type | Description
--- | ---
Stream |

#### Persist()

Compatibility no-op kept for API parity with 4.x.

##### Declaration

    [Obsolete("This property is not used any more. A file should be marked as persisted after validation.", false)]
    public void Persist()