public interface FileSystemOperations
An instance of this type can be injected into a task, plugin or other object by annotating a public constructor or property getter method with javax.inject.Inject
.
Modifier and Type | Method | Description |
---|---|---|
WorkResult |
copy(Action<? super CopySpec> action) |
Copies the specified files.
|
CopySpec |
copySpec() |
Creates a
CopySpec which can later be used to copy files or create an archive. |
CopySpec |
copySpec(Action<? super CopySpec> action) |
Creates a
CopySpec which can later be used to copy files or create an archive. |
WorkResult |
delete(Action<? super DeleteSpec> action) |
Deletes the specified files.
|
ConfigurableFilePermissions |
directoryPermissions(Action<? super ConfigurableFilePermissions> configureAction) |
Creates and configures directory access permissions.
|
ConfigurableFilePermissions |
filePermissions(Action<? super ConfigurableFilePermissions> configureAction) |
Creates and configures file access permissions.
|
ConfigurableFilePermissions |
permissions(int unixNumeric) |
Creates file/directory access permissions and initializes them via a Unix style numeric permissions.
|
ConfigurableFilePermissions |
permissions(java.lang.String unixNumericOrSymbolic) |
Creates file/directory access permissions and initializes them via a Unix style permission string.
|
Provider<ConfigurableFilePermissions> |
permissions(Provider<java.lang.String> permissions) |
Provider based version of permissions(String) , to facilitate wiring into property chains. |
WorkResult |
sync(Action<? super CopySpec> action) |
Synchronizes the contents of a destination directory with some source directories and files.
|
@Incubating CopySpec copySpec(Action<? super CopySpec> action)
CopySpec
which can later be used to copy files or create an archive. The given action is used
to configure the CopySpec
before it is returned by this method.action
- Action to configure the CopySpec@Incubating CopySpec copySpec()
CopySpec
which can later be used to copy files or create an archive.WorkResult copy(Action<? super CopySpec> action)
CopySpec
, which is then used to copy the files.action
- Action to configure the CopySpecWorkResult
that can be used to check if the copy did any work.WorkResult sync(Action<? super CopySpec> action)
CopySpec
, which is then used to synchronize the files.action
- action Action to configure the CopySpec.WorkResult
that can be used to check if the sync did any work.WorkResult delete(Action<? super DeleteSpec> action)
DeleteSpec
, which is then used to delete the files.action
- Action to configure the DeleteSpecWorkResult
that can be used to check if delete did any work.ConfigurableFilePermissions filePermissions(Action<? super ConfigurableFilePermissions> configureAction)
ConfigurableFilePermissions
.configureAction
- The configuration that gets applied to the newly created FilePermissions
.ConfigurableFilePermissions directoryPermissions(Action<? super ConfigurableFilePermissions> configureAction)
ConfigurableFilePermissions
.configureAction
- The configuration that gets applied to the newly created FilePermissions
.ConfigurableFilePermissions permissions(java.lang.String unixNumericOrSymbolic)
ConfigurableFilePermissions.unix(String)
.
Doesn't have separate variants for files and directories, like other configuration methods, because the Unix style permission input completely overwrites the default values, so the distinction doesn't matter.
ConfigurableFilePermissions permissions(int unixNumeric)
ConfigurableFilePermissions.unix(int)
.
Doesn't have separate variants for files and directories, like other configuration methods, because the Unix style permission input completely overwrites the default values, so the distinction doesn't matter.
Provider<ConfigurableFilePermissions> permissions(Provider<java.lang.String> permissions)
Provider
based version of permissions(String)
, to facilitate wiring into property chains.