summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFredy <aluque@soleta.eu>2018-07-05 13:17:19 +0200
committerFredy <aluque@soleta.eu>2018-07-05 13:17:19 +0200
commite0c7c420aacda93edcdd16e0cd6c8192ea7f2310 (patch)
tree7169e9bc12053316acc0c297f2f8b1293e7341da
parent01ae374d4e8099b0d3c87dce8e0a8c44856bdf4f (diff)
parentd01525bd830f71c8ff9fe013a574a96a6622402b (diff)
Merge branch 'devel' of opengnsys.es:/git/opengnsys into devel
-rwxr-xr-xclient/engine/File.lib14
-rwxr-xr-xclient/engine/FileSystem.lib24
2 files changed, 30 insertions, 8 deletions
diff --git a/client/engine/File.lib b/client/engine/File.lib
index f37e947d..1be1a338 100755
--- a/client/engine/File.lib
+++ b/client/engine/File.lib
@@ -229,7 +229,11 @@ rm -fr "$DIR" || ogRaiseError $OG_ERR_NOTFOUND "$*" || return $?
#@version 0.9 - Pruebas con OpenGnSys.
#@author Ramon Gomez, ETSII Universidad de Sevilla
#@date 2009-09-15
+#@version 1.1.1 - Correccion comentarios autodocumentacion doxygen .
+#@author Antonio J. Doblas Viso. Universidad de Malaga
+#@date 2018-07-05
#*/ ##
+
function ogGetPath ()
{
# Variables locales.
@@ -266,7 +270,7 @@ case $# in
esac
# Eliminar caracteres \c / duplicados y finales.
- # /* (comentario Doxygen)
+
FILE="$(echo $FILE|sed -e 's/\(\/\)*\1/\//g; s/\/$//')"
# Comprobar si existe el fichero para reducir tiempos.
if [ -e "$FILE" ]; then
@@ -274,13 +278,14 @@ if [ -e "$FILE" ]; then
else
# Buscar el nombre correcto en cada subdirectorio del camino.
FILEPATH="/"
+
while [ "$FILE" != "$PREVFILE" ]; do
- FILEPATH="$(ls -d "${FILEPATH%/}/${FILE%%/*}" 2>/dev/null || find "$FILEPATH" -maxdepth 1 -iname "${FILE%%/*}" -print 2>/dev/null)"
+ FILEPATH="$(ls -d "${FILEPATH%/}/${FILE%%/*}" 2>/dev/null || find "$FILEPATH" -maxdepth 1 -iname "${FILE%%/*}" -print 2>/dev/null)" #*/ (Comentario Doxygen)
PREVFILE="$FILE"
- FILE="${FILE#*/}"
+ FILE="${FILE#*/}"
done
+
fi
- # (comentario Doxygen) */
[ -n "$FILEPATH" ] && echo "$FILEPATH"
return 0
}
@@ -294,6 +299,7 @@ return 0
#@author Ramon Gomez, ETSII Universidad de Sevilla
#@date 2009-09-29
#*/ ##
+
function ogGetParentPath ()
{
local PARENT
diff --git a/client/engine/FileSystem.lib b/client/engine/FileSystem.lib
index 868642fd..0642a854 100755
--- a/client/engine/FileSystem.lib
+++ b/client/engine/FileSystem.lib
@@ -602,7 +602,8 @@ test -n "$(ogGetMountPoint $1 $2)"
#@version 1.1.0 - Primera versión para OpenGnsys.
#@author Ramon Gomez, ETSII Universidad de Sevilla
#@date 2016-01-20
-#/**
+#*/ ##
+
function ogIsReadonly ()
{
# Variables locales
@@ -631,7 +632,7 @@ test -n "$(findmnt -n -o OPTIONS $PART | awk 'BEGIN {RS=","} /^ro$/ {print}')"
#@version 1.0.5 - Primera versión para OpenGnSys.
#@author Ramon Gomez, ETSII Universidad de Sevilla
#@date 2013-10-09
-#/**
+#*/ ##
function ogIsWritable ()
{
# Variables locales
@@ -1145,8 +1146,23 @@ case "$(ogGetFsType $1 $2)" in
esac
}
-# AVISO: Componer corretcamente esta función.
-function ogGetFreeSize () {
+
+#/**
+# ogGetFreeSize int_disco int_partition str_SizeOutput
+#@brief muestra informacion del tamaño total, datos y libre.
+#@param int_ndisk nº de orden del disco
+#@param int_npart nº de orden de partición
+#@param str_unitSize unidad mostrada
+#@return int_size:int_data:int_free
+#@TODO Componer corretcamente esta función.
+#@exception OG_ERR_FORMAT Formato incorrecto.
+#@version
+#@author
+#@date
+#*/ ##
+
+function ogGetFreeSize ()
+{
local particion unit factor valor
if [ $# = 0 ]
then