Hardlinks on NTFS

  • Thread starter Wildemar Wildenburger
  • Start date
W

Wildemar Wildenburger

Hi :)

I'm thinking of letting my program create hardlinks (or symlinks). I
know python allows doing this for ext, reiser and the like, but
apparently not for ntfs systems.
Is there any package out there that lets me create links in a platform
independent way?

bye
wildemar
 
M

Méta-MCI

Hi!

Here, a copy of a message send on anither newsgroup (by me).




Summary on hardlink & junction-point.

*** Sorry, this text is in french ; but command & links are good. ***

Synthèse sur les hardlinks et les points de jonction.


- Les hardlinks sont des alias sur des fichiers.
- Les points de jonction sont des alias sur des répertoires.



A) Hardlink

Pour créer des hardlinks, le mieux est d'utiliser fsutil.exe
Tapez fsutil create hardlink [Entrée] pour voir la syntaxe

Fsutil n'est pas fourni avec W2K, mais le fichier de XP fonctionne très
bien.

Pour connaître la liste des hardlinks, il existe hlscan.exe , fourni avec
le Windows-resource-kit

Quelques infos de plus, par l'aide de windows, en cherchant "hardlink"



B) Point de jonction

Un point de jonction permet de considérer un volume, une unité, ou un
répertoire, comme un sous-répertoire. Il s'agit alors d'un alias, avec
répercussion instantanée des modifications.

Dans un DIR, les points de jonction apparaissent avec <JONCTION> à la place
de <REP>

Pour créer un point de jonction, il existe linkd.exe , fourni avec le
Windows-resource-kit
Linkd.exe permet aussi le suppression des points de jonction (mais RD
fonctionne aussi bien)

Pour une aide sur linkd : linkd /? (fallait y penser, hein!)

Un article MS sur les points de jonction :
http://support.microsoft.com/Default.aspx?kbid=205524

Quelques renseignements dans l'aide de windows, à "point jonction"
(glossaire). Chercher aussi "lecteur monté"





Faites de beaux rêves.

Michel Claveau
 
D

Dennis Lee Bieber

Is there any package out there that lets me create links in a platform
independent way?
The very concept of links is OS dependent. (Practically no
application on my old Amiga was coded to work with soft links, even
though the file system had "support" for them -- one had to check the
directory entry status to find it was a soft link, open the file, read
the real file name/path, close the link file, then open the real file).

--
Wulfraed Dennis Lee Bieber KD6MOG
(e-mail address removed) (e-mail address removed)
HTTP://wlfraed.home.netcom.com/
(Bestiaria Support Staff: (e-mail address removed))
HTTP://www.bestiaria.com/
 
D

Dieter Deyke

Wildemar Wildenburger said:
Hi :)

I'm thinking of letting my program create hardlinks (or symlinks). I
know python allows doing this for ext, reiser and the like, but
apparently not for ntfs systems.
Is there any package out there that lets me create links in a platform
independent way?

bye
wildemar

This is my solution:

import os

def CreateHardLink(src, dst):
import ctypes
if not ctypes.windll.kernel32.CreateHardLinkA(dst, src, 0): raise OSError

os.link = CreateHardLink
 
W

Wildemar Wildenburger

Dieter said:
This is my solution:

import os

def CreateHardLink(src, dst):
import ctypes
if not ctypes.windll.kernel32.CreateHardLinkA(dst, src, 0): raise OSError

os.link = CreateHardLink

Cool, thanks. :)

wildemar
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top