mirror of
https://github.com/androidx/media.git
synced 2025-05-18 13:09:56 +08:00

By default methods File.makeDir() and File.makeDirs() can return 'false' if file aleady exists or can not be created. Such silent ignore of the situation propagates misbehavior to the caller: CacheDataSink#173 : new FileOutputStream(file). And then it throws not correct exception type 'FileNotFoundException'. While correct exception should be 'no space left on the device'. This can be fixed only with 'Files.createDirectories()' method that throws correct exception type.