MCPcopy Index your code
hub / github.com/aws/aws-cli / validate_directory

Function validate_directory

awscli/customizations/gamelift/uploadbuild.py:165–175  ·  view source on GitHub ↗
(source_root)

Source from the content-addressed store, hash-verified

163
164
165def validate_directory(source_root):
166 # For Python26 on Windows, passing an empty string equates to the
167 # current directory, which is not intended behavior.
168 if not source_root:
169 return False
170 # We walk the root because we want to validate there's at least one file
171 # that exists recursively from the root directory
172 for path, dirs, files in os.walk(source_root):
173 if files:
174 return True
175 return False
176
177
178# TODO: Remove this class once available to CLI from s3transfer

Calls 1

walkMethod · 0.45