docs: CLAUDE.md actualizado con fn run, tipos Go en functions/, bash functions
Documentación de fn run para todos los lenguajes, nueva ubicación de tipos Go, sección de uso por agentes. Añadidas funciones Bash del registry (shell, infra, core, pipelines). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
# assert_file_exists
|
||||
# ------------------
|
||||
# Verifica que un archivo existe en el filesystem.
|
||||
# Imprime su tamaño en bytes a stdout.
|
||||
# Sale con exit code 1 si el archivo no existe.
|
||||
#
|
||||
# USO (sourced):
|
||||
# source assert_file_exists.sh
|
||||
# size=$(assert_file_exists /ruta/al/archivo)
|
||||
|
||||
assert_file_exists() {
|
||||
local file_path="$1"
|
||||
|
||||
if [ ! -f "$file_path" ]; then
|
||||
echo "assert_file_exists: archivo no encontrado: $file_path" >&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
stat -c%s "$file_path"
|
||||
}
|
||||
Reference in New Issue
Block a user