OVH Cloud OVH Cloud

Programmation C : Attributs de fichier

5 réponses
Avatar
aurelien.dejean
Je souhaite changer dans un programme C (pas C++) les attributs d'un
fichier windows.
J'ai utilisé la fonction _chmod, mais je n'ai accès qu'aux attributs
de lecture/écriture.
Je souhaite pourvoir changer l'attribut correspondant au fichier
caché.
Si quelqu'un possède une solution ...

5 réponses

Avatar
Thierry
Bonjour,

Aurelien a écrit :

Je souhaite pourvoir changer l'attribut correspondant au fichier



Changer Attribut Fichier -> SetFileAttributes.

--
"Oh God I am the American dream
I do not think I'm too extreme
An' I'm a handsome son of a bitch
I'm gonna get a good job 'n' be real rich"
Avatar
aurelien.dejean
Thierry wrote in message news:...
Bonjour,

Aurelien a écrit :

> Je souhaite pourvoir changer l'attribut correspondant au fichier

Changer Attribut Fichier -> SetFileAttributes.



Merci beaucoup !!!
Avatar
Dominique Vaufreydaz
Bonjour,

Changer Attribut Fichier -> SetFileAttributes.


Merci beaucoup !!!



Attention, SetFileAttributes n'est pas une fonction
C standard => le code n'est pas portable.

Doms.
--
Impose ta chance, serre ton bonheur et va vers ton risque.
A te regarder, ils s'habitueront.
René Char, Les Matinaux.
----
http://www-prima.inrialpes.fr/Vaufreydaz/
http://slmg.imag.fr/
http://slmg-index.imag.fr/
http://TitchKaRa.free.fr/
http://logiciels.ntfaqfr.com/
Avatar
David Scrève
"Dominique Vaufreydaz" a écrit dans le message de news:bfls8m$ieu$
Bonjour,

>> Changer Attribut Fichier -> SetFileAttributes.
> Merci beaucoup !!!

Attention, SetFileAttributes n'est pas une fonction
C standard => le code n'est pas portable.



Comme de toute façon, les attributs de fichier, c'est pas portable, il n'y a pas
de problème...

David
Avatar
Dominique Vaufreydaz
Re,

Comme de toute façon, les attributs de fichier, c'est pas portable, il n'y a pas
de problème...



Je sais bien, c'etait juste pour etre sur que le monsieur se rende compte
de ca. Sa question etait "programmation C...".

Doms.
--
Impose ta chance, serre ton bonheur et va vers ton risque.
A te regarder, ils s'habitueront.
René Char, Les Matinaux.
----
http://www-prima.inrialpes.fr/Vaufreydaz/
http://slmg.imag.fr/
http://slmg-index.imag.fr/
http://TitchKaRa.free.fr/
http://logiciels.ntfaqfr.com/