FileSystem
File system utilities.
Initializers
import "github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore"
alicloudroscdkcore.NewFileSystem() FileSystem
Name | Type | Description |
---|---|---|
Static Functions
Name | Description |
---|---|
CopyDirectory |
Copies an entire directory structure. |
Fingerprint |
Produces fingerprint based on the contents of a single file or an entire directory tree. |
IsEmpty |
Checks whether a directory is empty. |
Mkdtemp |
Creates a unique temporary directory in the system temp directory. |
CopyDirectory
import "github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore"
alicloudroscdkcore.FileSystem_CopyDirectory(srcDir *string, destDir *string, options CopyOptions, rootDir *string)
Copies an entire directory structure.
- Type: *string
Source directory.
- Type: *string
Destination directory.
- Type: CopyOptions
options.
- Type: *string
Root directory to calculate exclusions from.
Fingerprint
import "github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore"
alicloudroscdkcore.FileSystem_Fingerprint(fileOrDirectory *string, options FingerprintOptions) *string
Produces fingerprint based on the contents of a single file or an entire directory tree.
Line endings are converted from CRLF to LF.
The fingerprint will also include:
- An extra string if defined in
options.extra
. - The symlink follow mode value.
- Type: *string
The directory or file to fingerprint.
- Type: FingerprintOptions
Fingerprinting options.
IsEmpty
import "github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore"
alicloudroscdkcore.FileSystem_IsEmpty(dir *string) *bool
Checks whether a directory is empty.
- Type: *string
The directory to check.
Mkdtemp
import "github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore"
alicloudroscdkcore.FileSystem_Mkdtemp(prefix *string) *string
Creates a unique temporary directory in the system temp directory.
- Type: *string
A prefix for the directory name.
Six random characters will be generated and appended behind this prefix.
Properties
Name | Type | Description |
---|---|---|
Tmpdir |
*string |
The real path of the system temp directory. |
Tmpdir
Required
func Tmpdir() *string
- Type: *string
The real path of the system temp directory.