mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Merge pull request #29369 from thatch45/fs_meta
Start on adding file metadata #2707
This commit is contained in:
commit
9dbdcef4da
@ -97,6 +97,7 @@ def find_file(path, saltenv='base', env=None, **kwargs):
|
||||
__opts__, full):
|
||||
fnd['path'] = full
|
||||
fnd['rel'] = path
|
||||
fnd['stat'] = list(os.stat(full))
|
||||
return fnd
|
||||
|
||||
|
||||
|
@ -687,6 +687,7 @@ def find_file(path, tgt_env='base', **kwargs): # pylint: disable=W0613
|
||||
pass
|
||||
fnd['rel'] = path
|
||||
fnd['path'] = dest
|
||||
fnd['stat'] = list(os.stat(dest))
|
||||
repo['repo'].close()
|
||||
return fnd
|
||||
return fnd
|
||||
|
@ -91,6 +91,7 @@ def find_file(path, tgt_env='base', **kwargs): # pylint: disable=W0613
|
||||
and not salt.fileserver.is_file_ignored(__opts__, full):
|
||||
fnd['path'] = full
|
||||
fnd['rel'] = path
|
||||
fnd['stat'] = list(os.stat(full))
|
||||
return fnd
|
||||
return fnd
|
||||
|
||||
|
@ -64,12 +64,14 @@ def find_file(path, saltenv='base', env=None, **kwargs):
|
||||
if os.path.isfile(full) and not salt.fileserver.is_file_ignored(__opts__, full):
|
||||
fnd['path'] = full
|
||||
fnd['rel'] = path
|
||||
fnd['stat'] = list(os.stat(full))
|
||||
return fnd
|
||||
for root in __opts__['file_roots'][saltenv]:
|
||||
full = os.path.join(root, path)
|
||||
if os.path.isfile(full) and not salt.fileserver.is_file_ignored(__opts__, full):
|
||||
fnd['path'] = full
|
||||
fnd['rel'] = path
|
||||
fnd['stat'] = list(os.stat(full))
|
||||
return fnd
|
||||
return fnd
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user