Package com.google.cloud.tools.io
Class FilePermissions
- java.lang.Object
-
- com.google.cloud.tools.io.FilePermissions
-
@Beta public class FilePermissions extends Object
Non-IDE specific utility methods for working with file systems. We hope to migrate these into Guava. Clients should beware that these methods are not yet stable and may change without notice.
-
-
Constructor Summary
Constructors Constructor Description FilePermissions()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
verifyDirectoryCreatable(Path path)
Check whether the current process can create a directory at the specified path.
-
-
-
Method Detail
-
verifyDirectoryCreatable
public static void verifyDirectoryCreatable(Path path) throws AccessDeniedException, NotDirectoryException
Check whether the current process can create a directory at the specified path. This is useful for providing immediate feedback to an end user that a path they have selected or typed may not be suitable before attempting to create the directory; e.g. in a tooltip.- Parameters:
path
- tentative location for directory- Throws:
AccessDeniedException
- if a directory in the path is not writableNotDirectoryException
- if a segment of the path is a file
-
-