StorageManager.SetCacheBehaviorGroup(File, Boolean) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Enable or disable special cache behavior that treats this directory and its contents as an entire group.
[Android.Runtime.Register("setCacheBehaviorGroup", "(Ljava/io/File;Z)V", "GetSetCacheBehaviorGroup_Ljava_io_File_ZHandler", ApiSince=26)]
public virtual void SetCacheBehaviorGroup (Java.IO.File? path, bool group);
[<Android.Runtime.Register("setCacheBehaviorGroup", "(Ljava/io/File;Z)V", "GetSetCacheBehaviorGroup_Ljava_io_File_ZHandler", ApiSince=26)>]
abstract member SetCacheBehaviorGroup : Java.IO.File * bool -> unit
override this.SetCacheBehaviorGroup : Java.IO.File * bool -> unit
Parameters
- path
- File
- group
- Boolean
- Attributes
Remarks
Enable or disable special cache behavior that treats this directory and its contents as an entire group.
When enabled and this directory is considered for automatic deletion by the OS, all contained files will either be deleted together, or not at all. This is useful when you have a directory that contains several related metadata files that depend on each other, such as movie file and a subtitle file.
When enabled, the <em>newest</em> File#lastModified()
value of any contained files is considered the modified time of the entire directory.
This behavior can only be set on a directory, and it applies recursively to all contained files and directories.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.