2 * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 namespace Tizen.Content.MediaContent
22 /// Represents the folder information for the media.
25 /// The <see cref="Folder"/> is used to organize media content files, i.e., image, audio, and video files,
26 /// in the physical storage of the device.
28 /// <since_tizen> 4 </since_tizen>
31 internal Folder(IntPtr handle)
33 Id = InteropHelper.GetString(handle, Interop.Folder.GetFolderId);
34 Path = InteropHelper.GetString(handle, Interop.Folder.GetPath);
35 Name = InteropHelper.GetString(handle, Interop.Folder.GetName);
37 StorageType = InteropHelper.GetValue<StorageType>(handle, Interop.Folder.GetStorageType);
38 StorageId = InteropHelper.GetString(handle, Interop.Folder.GetStorageId);
41 internal static Folder FromHandle(IntPtr handle) => new Folder(handle);
44 /// Gets the ID of the folder.
46 /// <value>The unique ID of the folder.</value>
47 /// <since_tizen> 4 </since_tizen>
48 public string Id { get; }
51 /// Gets the path of the folder.
53 /// <value>The path of the folder.</value>
54 /// <since_tizen> 4 </since_tizen>
55 public string Path { get; }
58 /// Gets the name of the folder.
60 /// <value>The name of the folder.</value>
61 /// <since_tizen> 4 </since_tizen>
62 public string Name { get; }
65 /// Gets the <see cref="StorageType"/> of the storage that the folder exists.
67 /// <value>The <see cref="StorageType"/> of the storage that the folder exists.</value>
68 /// <since_tizen> 4 </since_tizen>
69 [Obsolete("Please do not use! this will be deprecated in level 6")]
70 public StorageType StorageType { get; }
73 /// Gets the storage ID of the storage that the folder exists.
75 /// <value>The storage ID of the storage that the folder exists.</value>
76 /// <since_tizen> 4 </since_tizen>
77 [Obsolete("Please do not use! this will be deprecated in level 6")]
78 public string StorageId { get; }
81 /// Returns a string representation of the folder.
83 /// <returns>A string representation of the current folder.</returns>
84 /// <since_tizen> 4 </since_tizen>
85 public override string ToString() =>
86 $"Id={Id}, Name={Name}, Path={Path}, StorageType={StorageType}, StorageId={StorageType}";