Skip to content
This repository has been archived by the owner on Jun 28, 2021. It is now read-only.
/ serverpath Public archive

Platform-independent server-share path discovery.

Notifications You must be signed in to change notification settings

deluccial/serverpath

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Platform-independent server-share path discovery.

To install:

pip install serverpath

Examples:

from serverpath import get_path

# from Windows machine without mapped network drive
get_path("server", "share")
>>> \\server\share

# from Windows machine with mapped network drive X
get_path("server", "share")
>>> X:\\

# from Windows machine where server is local machine and drive D is shared over network 
get_path("my-computer", "share")
>>> D:\\

# from Unix machine with Samba mount in /mnt without share
get_path("server")
>>> /mnt/server

# from Unix machine with Samba mount in /mnt with share
get_path("server", "share")
>>> /mnt/server/share

# from Unix machine with mount in custom path
get_path("server", "share", unix_path_prefix="/mymount")
>>> /mymount/server/share

About

Platform-independent server-share path discovery.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages