Skip to content

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.

srcDirRequired

  • Type: *string

Source directory.


destDirRequired

  • Type: *string

Destination directory.


optionsOptional

options.


rootDirOptional

  • 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:

  1. An extra string if defined in options.extra.
  2. The symlink follow mode value.

fileOrDirectoryRequired

  • Type: *string

The directory or file to fingerprint.


optionsOptional

Fingerprinting options.


IsEmpty

import "github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore"
alicloudroscdkcore.FileSystem_IsEmpty(dir *string) *bool

Checks whether a directory is empty.

dirRequired

  • 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.

prefixRequired

  • 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.

TmpdirRequired

func Tmpdir() *string
  • Type: *string

The real path of the system temp directory.