Class UniqueMediaPathScheme
Implements a unique directory media path scheme.
Inheritance
Namespace: Umbraco.Cms.Core.IO.MediaPathSchemes
Assembly: Umbraco.Core.dll
Syntax
public class UniqueMediaPathScheme : IMediaPathScheme
Remarks
This scheme provides deterministic short paths, with potential collisions.
Methods
View SourceGetDeleteDirectory(MediaFileManager, String)
Gets the directory that can be deleted when the file is deleted.
Declaration
public string GetDeleteDirectory(MediaFileManager fileManager, string filepath)
Parameters
Type | Name | Description |
---|---|---|
Media |
fileManager | |
System. |
filepath | The filesystem-relative path of the file. |
Returns
Type | Description |
---|---|
System. |
The filesystem-relative path of the directory. |
Remarks
Returning null so that
And, at the moment, we cannot delete directory "only if it is empty" because of
race conditions. We'd need to implement locks in
GetFilePath(MediaFileManager, Guid, Guid, String)
Gets a media file path.
Declaration
public string GetFilePath(MediaFileManager fileManager, Guid itemGuid, Guid propertyGuid, string filename)
Parameters
Type | Name | Description |
---|---|---|
Media |
fileManager | The media filesystem. |
Guid | itemGuid | The (content, media) item unique identifier. |
Guid | propertyGuid | The property type unique identifier. |
System. |
filename | The file name. |
Returns
Type | Description |
---|---|
System. |
The filesystem-relative complete file path. |