Logiciels - STAT - La commande STAT -

STAT - La commande STAT

( Temps de lecture estimé à 1 min 03 sec )




la Commande STAT



bonjour,
cet exemple tiré du forum francais sur gambas que nous a apporté Micio mérite des explications.
La commande STAT permet de récupéré des informations sur les fichiers.  voici donc lecode commenté :


'Affiche l 'appartenance aux groupe d 'utilisateurs:
PRINT Stat( ~/Documents/box.ods ).Group

Affiche si le fichier est un fichier caché:
PRINT Stat( ~/Documents/box.ods ).Hidden

Affiche la date du dernier accès au fichier:
PRINT Stat( ~/Documents/box.ods ).LastAccess

Affiche la date de la dernière modification:
PRINT Stat( ~/Documents/box.ods ).LastChange

Affiche la date de la dernière modification:
PRINT Stat( ~/Documents/box.ods ).LastModified

Affiche si loe fichier est un type lien symbolique:
PRINT Stat( ~/Documents/box.ods ).Link

Affiche si le fichier est un executable ou non:
PRINT Stat( ~/Documents/box.ods ).Mode

Affiche le chemin du fichier:
PRINT Stat( ~/Documents/box.ods ).Path

Affiche les permissions du fichier:
PRINT Stat( ~/Documents/box.ods ).Perm

Affiche le numero du groupe ou de l 'utilisateur (ID)
PRINT Stat( ~/Documents/box.ods ).SetGID
PRINT Stat( ~/Documents/box.ods ).SetUID

Affiche la taille du fichier
PRINT Stat( ~/Documents/box.ods ).Size

Affiche le Sticky(???) :
PRINT Stat( ~/Documents/box.ods ).Sticky

Affiche l 'heure de creation du fichier:
PRINT Stat( ~/Documents/box.ods ).Time

Affiche le type de fichier:
PRINT Stat( ~/Documents/box.ods ).Type

Affiche le nom du propriétaire du fichier :
PRINT Stat( ~/Documents/box.ods ).User

Merci pour ton aide Micio ! wink
A+);



Date de creation :
Redacteur : Rédigé par spheris
Classé dans : Logiciels