/*
* Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
*
* Licensed under the Apache License, Version 2.0 (the License);
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an AS IS BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using System;
namespace Tizen.Content.MediaContent
{
///
/// Represents the folder information for media.
///
///
/// A is used to organize media content files i.e. image, audio, video files,
/// in the physical storage of the device.
///
public class Folder
{
internal Folder(IntPtr handle)
{
Id = InteropHelper.GetString(handle, Interop.Folder.GetFolderId);
Path = InteropHelper.GetString(handle, Interop.Folder.GetPath);
Name = InteropHelper.GetString(handle, Interop.Folder.GetName);
StorageType = InteropHelper.GetValue(handle, Interop.Folder.GetStorageType);
StorageId = InteropHelper.GetString(handle, Interop.Folder.GetStorageId);
}
internal static Folder FromHandle(IntPtr handle) => new Folder(handle);
///
/// Gets the id of folder.
///
/// The unique id of folder.
public string Id { get; }
///
/// Gets the path of folder.
///
/// The path of folder.
public string Path { get; }
///
/// Gets the name of folder.
///
/// The name of folder.
public string Name { get; }
///
/// Gets the of the storage that the folder exists.
///
/// The of the storage that the folder exists.
public StorageType StorageType { get; }
///
/// Gets the storage id of the storage that the folder exists.
///
/// The storage id of the storage that the folder exists.
public string StorageId { get; }
///
/// Returns a string representation of the folder.
///
/// A string representation of the current folder.
public override string ToString() =>
$"Id={Id}, Name={Name}, Path={Path}, StorageType={StorageType}, StorageId={StorageType}";
}
}