5 <link rel="stylesheet" href="styles.css"> |
5 <link rel="stylesheet" href="styles.css"> |
6 </head> |
6 </head> |
7 <body> |
7 <body> |
8 <a NAME="top" ID="top"></a> |
8 <a NAME="top" ID="top"></a> |
9 <h1>eric7.SystemUtilities.FileSystemUtilities</h1> |
9 <h1>eric7.SystemUtilities.FileSystemUtilities</h1> |
10 |
|
11 <p> |
10 <p> |
12 Module implementing file system related utility functions. |
11 Module implementing file system related utility functions. |
13 </p> |
12 </p> |
|
13 |
14 <h3>Global Attributes</h3> |
14 <h3>Global Attributes</h3> |
15 |
|
16 <table> |
15 <table> |
17 <tr><td>_DeviceFileMarker</td></tr><tr><td>_RemoteFileMarker</td></tr> |
16 <tr><td>_DeviceFileMarker</td></tr> |
|
17 <tr><td>_RemoteFileMarker</td></tr> |
18 </table> |
18 </table> |
|
19 |
19 <h3>Classes</h3> |
20 <h3>Classes</h3> |
20 |
|
21 <table> |
21 <table> |
22 <tr><td>None</td></tr> |
22 <tr><td>None</td></tr> |
23 </table> |
23 </table> |
|
24 |
24 <h3>Functions</h3> |
25 <h3>Functions</h3> |
25 |
|
26 <table> |
26 <table> |
27 |
|
28 <tr> |
27 <tr> |
29 <td><a href="#absolutePath">absolutePath</a></td> |
28 <td><a href="#absolutePath">absolutePath</a></td> |
30 <td>Public method to convert a path relative to a start path to an absolute path.</td> |
29 <td>Public method to convert a path relative to a start path to an absolute path.</td> |
31 </tr> |
30 </tr> |
32 <tr> |
31 <tr> |
156 <tr> |
155 <tr> |
157 <td><a href="#toNativeSeparators">toNativeSeparators</a></td> |
156 <td><a href="#toNativeSeparators">toNativeSeparators</a></td> |
158 <td>Function returning a path, that is using native separator characters.</td> |
157 <td>Function returning a path, that is using native separator characters.</td> |
159 </tr> |
158 </tr> |
160 </table> |
159 </table> |
|
160 |
161 <hr /> |
161 <hr /> |
162 <hr /> |
162 <hr /> |
163 <a NAME="absolutePath" ID="absolutePath"></a> |
163 <a NAME="absolutePath" ID="absolutePath"></a> |
164 <h2>absolutePath</h2> |
164 <h2>absolutePath</h2> |
165 <b>absolutePath</b>(<i>path, start</i>) |
165 <b>absolutePath</b>(<i>path, start</i>) |
166 |
|
167 <p> |
166 <p> |
168 Public method to convert a path relative to a start path to an |
167 Public method to convert a path relative to a start path to an |
169 absolute path. |
168 absolute path. |
170 </p> |
169 </p> |
|
170 |
171 <dl> |
171 <dl> |
172 |
172 |
173 <dt><i>path</i> (str)</dt> |
173 <dt><i>path</i> (str)</dt> |
174 <dd> |
174 <dd> |
175 file or directory name to convert |
175 file or directory name to convert |
195 <hr /> |
195 <hr /> |
196 <hr /> |
196 <hr /> |
197 <a NAME="absoluteUniversalPath" ID="absoluteUniversalPath"></a> |
197 <a NAME="absoluteUniversalPath" ID="absoluteUniversalPath"></a> |
198 <h2>absoluteUniversalPath</h2> |
198 <h2>absoluteUniversalPath</h2> |
199 <b>absoluteUniversalPath</b>(<i>path, start</i>) |
199 <b>absoluteUniversalPath</b>(<i>path, start</i>) |
200 |
|
201 <p> |
200 <p> |
202 Public method to convert a path relative to a start path with |
201 Public method to convert a path relative to a start path with |
203 universal separators to an absolute path. |
202 universal separators to an absolute path. |
204 </p> |
203 </p> |
|
204 |
205 <dl> |
205 <dl> |
206 |
206 |
207 <dt><i>path</i> (str)</dt> |
207 <dt><i>path</i> (str)</dt> |
208 <dd> |
208 <dd> |
209 file or directory name to convert |
209 file or directory name to convert |
229 <hr /> |
229 <hr /> |
230 <hr /> |
230 <hr /> |
231 <a NAME="compactPath" ID="compactPath"></a> |
231 <a NAME="compactPath" ID="compactPath"></a> |
232 <h2>compactPath</h2> |
232 <h2>compactPath</h2> |
233 <b>compactPath</b>(<i>path, width, measure=len</i>) |
233 <b>compactPath</b>(<i>path, width, measure=len</i>) |
234 |
|
235 <p> |
234 <p> |
236 Function to return a compacted path fitting inside the given width. |
235 Function to return a compacted path fitting inside the given width. |
237 </p> |
236 </p> |
|
237 |
238 <dl> |
238 <dl> |
239 |
239 |
240 <dt><i>path</i> (str)</dt> |
240 <dt><i>path</i> (str)</dt> |
241 <dd> |
241 <dd> |
242 path to be compacted |
242 path to be compacted |
267 <hr /> |
267 <hr /> |
268 <hr /> |
268 <hr /> |
269 <a NAME="deviceFileName" ID="deviceFileName"></a> |
269 <a NAME="deviceFileName" ID="deviceFileName"></a> |
270 <h2>deviceFileName</h2> |
270 <h2>deviceFileName</h2> |
271 <b>deviceFileName</b>(<i>fileName</i>) |
271 <b>deviceFileName</b>(<i>fileName</i>) |
272 |
|
273 <p> |
272 <p> |
274 Function to create a device (MicroPython) file name given a plain file name. |
273 Function to create a device (MicroPython) file name given a plain file name. |
275 </p> |
274 </p> |
|
275 |
276 <dl> |
276 <dl> |
277 |
277 |
278 <dt><i>fileName</i> (str)</dt> |
278 <dt><i>fileName</i> (str)</dt> |
279 <dd> |
279 <dd> |
280 plain file name |
280 plain file name |
296 <hr /> |
296 <hr /> |
297 <hr /> |
297 <hr /> |
298 <a NAME="direntries" ID="direntries"></a> |
298 <a NAME="direntries" ID="direntries"></a> |
299 <h2>direntries</h2> |
299 <h2>direntries</h2> |
300 <b>direntries</b>(<i>path, filesonly=False, pattern=None, followsymlinks=True, checkStop=None, ignore=None, </i>) |
300 <b>direntries</b>(<i>path, filesonly=False, pattern=None, followsymlinks=True, checkStop=None, ignore=None, </i>) |
301 |
|
302 <p> |
301 <p> |
303 Function returning a list of all files and directories. |
302 Function returning a list of all files and directories. |
304 </p> |
303 </p> |
|
304 |
305 <dl> |
305 <dl> |
306 |
306 |
307 <dt><i>path</i> (str)</dt> |
307 <dt><i>path</i> (str)</dt> |
308 <dd> |
308 <dd> |
309 root of the tree to check |
309 root of the tree to check |
348 <hr /> |
348 <hr /> |
349 <hr /> |
349 <hr /> |
350 <a NAME="findVolume" ID="findVolume"></a> |
350 <a NAME="findVolume" ID="findVolume"></a> |
351 <h2>findVolume</h2> |
351 <h2>findVolume</h2> |
352 <b>findVolume</b>(<i>volumeName, findAll=False</i>) |
352 <b>findVolume</b>(<i>volumeName, findAll=False</i>) |
353 |
|
354 <p> |
353 <p> |
355 Function to find the directory belonging to a given volume name. |
354 Function to find the directory belonging to a given volume name. |
356 </p> |
355 </p> |
|
356 |
357 <dl> |
357 <dl> |
358 |
358 |
359 <dt><i>volumeName</i> (str)</dt> |
359 <dt><i>volumeName</i> (str)</dt> |
360 <dd> |
360 <dd> |
361 name of the volume to search for |
361 name of the volume to search for |
383 <hr /> |
383 <hr /> |
384 <hr /> |
384 <hr /> |
385 <a NAME="fromNativeSeparators" ID="fromNativeSeparators"></a> |
385 <a NAME="fromNativeSeparators" ID="fromNativeSeparators"></a> |
386 <h2>fromNativeSeparators</h2> |
386 <h2>fromNativeSeparators</h2> |
387 <b>fromNativeSeparators</b>(<i>path</i>) |
387 <b>fromNativeSeparators</b>(<i>path</i>) |
388 |
|
389 <p> |
388 <p> |
390 Function returning a path, that is using "/" separator characters. |
389 Function returning a path, that is using "/" separator characters. |
391 </p> |
390 </p> |
|
391 |
392 <dl> |
392 <dl> |
393 |
393 |
394 <dt><i>path</i> (str)</dt> |
394 <dt><i>path</i> (str)</dt> |
395 <dd> |
395 <dd> |
396 path to be converted |
396 path to be converted |
412 <hr /> |
412 <hr /> |
413 <hr /> |
413 <hr /> |
414 <a NAME="getDirs" ID="getDirs"></a> |
414 <a NAME="getDirs" ID="getDirs"></a> |
415 <h2>getDirs</h2> |
415 <h2>getDirs</h2> |
416 <b>getDirs</b>(<i>path, excludeDirs</i>) |
416 <b>getDirs</b>(<i>path, excludeDirs</i>) |
417 |
|
418 <p> |
417 <p> |
419 Function returning a list of all directories below path. |
418 Function returning a list of all directories below path. |
420 </p> |
419 </p> |
|
420 |
421 <dl> |
421 <dl> |
422 |
422 |
423 <dt><i>path</i> (str)</dt> |
423 <dt><i>path</i> (str)</dt> |
424 <dd> |
424 <dd> |
425 root of the tree to check |
425 root of the tree to check |
445 <hr /> |
445 <hr /> |
446 <hr /> |
446 <hr /> |
447 <a NAME="getExecutablePath" ID="getExecutablePath"></a> |
447 <a NAME="getExecutablePath" ID="getExecutablePath"></a> |
448 <h2>getExecutablePath</h2> |
448 <h2>getExecutablePath</h2> |
449 <b>getExecutablePath</b>(<i>file</i>) |
449 <b>getExecutablePath</b>(<i>file</i>) |
450 |
|
451 <p> |
450 <p> |
452 Function to build the full path of an executable file from the environment. |
451 Function to build the full path of an executable file from the environment. |
453 </p> |
452 </p> |
|
453 |
454 <dl> |
454 <dl> |
455 |
455 |
456 <dt><i>file</i> (str)</dt> |
456 <dt><i>file</i> (str)</dt> |
457 <dd> |
457 <dd> |
458 filename of the executable to check |
458 filename of the executable to check |
476 <hr /> |
476 <hr /> |
477 <hr /> |
477 <hr /> |
478 <a NAME="getExecutablePaths" ID="getExecutablePaths"></a> |
478 <a NAME="getExecutablePaths" ID="getExecutablePaths"></a> |
479 <h2>getExecutablePaths</h2> |
479 <h2>getExecutablePaths</h2> |
480 <b>getExecutablePaths</b>(<i>file</i>) |
480 <b>getExecutablePaths</b>(<i>file</i>) |
481 |
|
482 <p> |
481 <p> |
483 Function to build all full path of an executable file from the environment. |
482 Function to build all full path of an executable file from the environment. |
484 </p> |
483 </p> |
|
484 |
485 <dl> |
485 <dl> |
486 |
486 |
487 <dt><i>file</i> (str)</dt> |
487 <dt><i>file</i> (str)</dt> |
488 <dd> |
488 <dd> |
489 filename of the executable |
489 filename of the executable |
507 <hr /> |
507 <hr /> |
508 <hr /> |
508 <hr /> |
509 <a NAME="getUserMounts" ID="getUserMounts"></a> |
509 <a NAME="getUserMounts" ID="getUserMounts"></a> |
510 <h2>getUserMounts</h2> |
510 <h2>getUserMounts</h2> |
511 <b>getUserMounts</b>(<i></i>) |
511 <b>getUserMounts</b>(<i></i>) |
512 |
|
513 <p> |
512 <p> |
514 Function to determine all available user mounts. |
513 Function to determine all available user mounts. |
515 </p> |
514 </p> |
516 <p> |
515 <p> |
517 Note: On Windows platforms all available drives are returned. |
516 Note: On Windows platforms all available drives are returned. |
518 </p> |
517 </p> |
|
518 |
519 <dl> |
519 <dl> |
520 <dt>Return:</dt> |
520 <dt>Return:</dt> |
521 <dd> |
521 <dd> |
522 list of user mounts or drives |
522 list of user mounts or drives |
523 </dd> |
523 </dd> |
532 <hr /> |
532 <hr /> |
533 <hr /> |
533 <hr /> |
534 <a NAME="getVolumeName" ID="getVolumeName"></a> |
534 <a NAME="getVolumeName" ID="getVolumeName"></a> |
535 <h2>getVolumeName</h2> |
535 <h2>getVolumeName</h2> |
536 <b>getVolumeName</b>(<i>diskName</i>) |
536 <b>getVolumeName</b>(<i>diskName</i>) |
537 |
|
538 <p> |
537 <p> |
539 Local function to determine the volume of a disk or device. |
538 Local function to determine the volume of a disk or device. |
540 </p> |
539 </p> |
541 <p> |
540 <p> |
542 Each disk or external device connected to windows has an |
541 Each disk or external device connected to windows has an |
544 volume name for the given disk/device. |
543 volume name for the given disk/device. |
545 </p> |
544 </p> |
546 <p> |
545 <p> |
547 Code from http://stackoverflow.com/a/12056414 |
546 Code from http://stackoverflow.com/a/12056414 |
548 </p> |
547 </p> |
|
548 |
549 <div align="right"><a href="#top">Up</a></div> |
549 <div align="right"><a href="#top">Up</a></div> |
550 <hr /> |
550 <hr /> |
551 <hr /> |
551 <hr /> |
552 <a NAME="getWindowsExecutablePath" ID="getWindowsExecutablePath"></a> |
552 <a NAME="getWindowsExecutablePath" ID="getWindowsExecutablePath"></a> |
553 <h2>getWindowsExecutablePath</h2> |
553 <h2>getWindowsExecutablePath</h2> |
554 <b>getWindowsExecutablePath</b>(<i>file</i>) |
554 <b>getWindowsExecutablePath</b>(<i>file</i>) |
555 |
|
556 <p> |
555 <p> |
557 Function to build the full path of an executable file from the environment |
556 Function to build the full path of an executable file from the environment |
558 on Windows platforms. |
557 on Windows platforms. |
559 </p> |
558 </p> |
560 <p> |
559 <p> |
561 First an executable with the extension .exe is searched for, thereafter |
560 First an executable with the extension .exe is searched for, thereafter |
562 such with the extensions .cmd or .bat and finally the given file name as |
561 such with the extensions .cmd or .bat and finally the given file name as |
563 is. The first match is returned. |
562 is. The first match is returned. |
564 </p> |
563 </p> |
|
564 |
565 <dl> |
565 <dl> |
566 |
566 |
567 <dt><i>file</i> (str)</dt> |
567 <dt><i>file</i> (str)</dt> |
568 <dd> |
568 <dd> |
569 filename of the executable to check |
569 filename of the executable to check |
587 <hr /> |
587 <hr /> |
588 <hr /> |
588 <hr /> |
589 <a NAME="isDeviceFileName" ID="isDeviceFileName"></a> |
589 <a NAME="isDeviceFileName" ID="isDeviceFileName"></a> |
590 <h2>isDeviceFileName</h2> |
590 <h2>isDeviceFileName</h2> |
591 <b>isDeviceFileName</b>(<i>fileName</i>) |
591 <b>isDeviceFileName</b>(<i>fileName</i>) |
592 |
|
593 <p> |
592 <p> |
594 Function to check, if the given file name is a device file name. |
593 Function to check, if the given file name is a device file name. |
595 </p> |
594 </p> |
|
595 |
596 <dl> |
596 <dl> |
597 |
597 |
598 <dt><i>fileName</i> (str)</dt> |
598 <dt><i>fileName</i> (str)</dt> |
599 <dd> |
599 <dd> |
600 file name to be checked |
600 file name to be checked |
616 <hr /> |
616 <hr /> |
617 <hr /> |
617 <hr /> |
618 <a NAME="isDrive" ID="isDrive"></a> |
618 <a NAME="isDrive" ID="isDrive"></a> |
619 <h2>isDrive</h2> |
619 <h2>isDrive</h2> |
620 <b>isDrive</b>(<i>path</i>) |
620 <b>isDrive</b>(<i>path</i>) |
621 |
|
622 <p> |
621 <p> |
623 Function to check, if a path is a Windows drive. |
622 Function to check, if a path is a Windows drive. |
624 </p> |
623 </p> |
|
624 |
625 <dl> |
625 <dl> |
626 |
626 |
627 <dt><i>path</i> (str)</dt> |
627 <dt><i>path</i> (str)</dt> |
628 <dd> |
628 <dd> |
629 path name to be checked |
629 path name to be checked |
645 <hr /> |
645 <hr /> |
646 <hr /> |
646 <hr /> |
647 <a NAME="isExecutable" ID="isExecutable"></a> |
647 <a NAME="isExecutable" ID="isExecutable"></a> |
648 <h2>isExecutable</h2> |
648 <h2>isExecutable</h2> |
649 <b>isExecutable</b>(<i>exe</i>) |
649 <b>isExecutable</b>(<i>exe</i>) |
650 |
|
651 <p> |
650 <p> |
652 Function to check, if a file is executable. |
651 Function to check, if a file is executable. |
653 </p> |
652 </p> |
|
653 |
654 <dl> |
654 <dl> |
655 |
655 |
656 <dt><i>exe</i> (str)</dt> |
656 <dt><i>exe</i> (str)</dt> |
657 <dd> |
657 <dd> |
658 filename of the executable to check |
658 filename of the executable to check |
674 <hr /> |
674 <hr /> |
675 <hr /> |
675 <hr /> |
676 <a NAME="isPlainFileName" ID="isPlainFileName"></a> |
676 <a NAME="isPlainFileName" ID="isPlainFileName"></a> |
677 <h2>isPlainFileName</h2> |
677 <h2>isPlainFileName</h2> |
678 <b>isPlainFileName</b>(<i>fileName</i>) |
678 <b>isPlainFileName</b>(<i>fileName</i>) |
679 |
|
680 <p> |
679 <p> |
681 Function to check, if the given file name is a plain (i.e. local) file name. |
680 Function to check, if the given file name is a plain (i.e. local) file name. |
682 </p> |
681 </p> |
|
682 |
683 <dl> |
683 <dl> |
684 |
684 |
685 <dt><i>fileName</i> (str)</dt> |
685 <dt><i>fileName</i> (str)</dt> |
686 <dd> |
686 <dd> |
687 file name to be checked |
687 file name to be checked |
703 <hr /> |
703 <hr /> |
704 <hr /> |
704 <hr /> |
705 <a NAME="isRemoteFileName" ID="isRemoteFileName"></a> |
705 <a NAME="isRemoteFileName" ID="isRemoteFileName"></a> |
706 <h2>isRemoteFileName</h2> |
706 <h2>isRemoteFileName</h2> |
707 <b>isRemoteFileName</b>(<i>fileName</i>) |
707 <b>isRemoteFileName</b>(<i>fileName</i>) |
708 |
|
709 <p> |
708 <p> |
710 Function to check, if the given file name is a remote file name. |
709 Function to check, if the given file name is a remote file name. |
711 </p> |
710 </p> |
|
711 |
712 <dl> |
712 <dl> |
713 |
713 |
714 <dt><i>fileName</i> (str)</dt> |
714 <dt><i>fileName</i> (str)</dt> |
715 <dd> |
715 <dd> |
716 file name to be checked |
716 file name to be checked |
732 <hr /> |
732 <hr /> |
733 <hr /> |
733 <hr /> |
734 <a NAME="isinpath" ID="isinpath"></a> |
734 <a NAME="isinpath" ID="isinpath"></a> |
735 <h2>isinpath</h2> |
735 <h2>isinpath</h2> |
736 <b>isinpath</b>(<i>file</i>) |
736 <b>isinpath</b>(<i>file</i>) |
737 |
|
738 <p> |
737 <p> |
739 Function to check for an executable file. |
738 Function to check for an executable file. |
740 </p> |
739 </p> |
|
740 |
741 <dl> |
741 <dl> |
742 |
742 |
743 <dt><i>file</i> (str)</dt> |
743 <dt><i>file</i> (str)</dt> |
744 <dd> |
744 <dd> |
745 filename of the executable to check |
745 filename of the executable to check |
762 <hr /> |
762 <hr /> |
763 <hr /> |
763 <hr /> |
764 <a NAME="joinext" ID="joinext"></a> |
764 <a NAME="joinext" ID="joinext"></a> |
765 <h2>joinext</h2> |
765 <h2>joinext</h2> |
766 <b>joinext</b>(<i>prefix, ext</i>) |
766 <b>joinext</b>(<i>prefix, ext</i>) |
767 |
|
768 <p> |
767 <p> |
769 Function to join a file extension to a path. |
768 Function to join a file extension to a path. |
770 </p> |
769 </p> |
771 <p> |
770 <p> |
772 The leading "." of ext is replaced by a platform specific extension |
771 The leading "." of ext is replaced by a platform specific extension |
773 separator if necessary. |
772 separator if necessary. |
774 </p> |
773 </p> |
|
774 |
775 <dl> |
775 <dl> |
776 |
776 |
777 <dt><i>prefix</i> (str)</dt> |
777 <dt><i>prefix</i> (str)</dt> |
778 <dd> |
778 <dd> |
779 the basepart of the filename |
779 the basepart of the filename |
799 <hr /> |
799 <hr /> |
800 <hr /> |
800 <hr /> |
801 <a NAME="normabsjoinpath" ID="normabsjoinpath"></a> |
801 <a NAME="normabsjoinpath" ID="normabsjoinpath"></a> |
802 <h2>normabsjoinpath</h2> |
802 <h2>normabsjoinpath</h2> |
803 <b>normabsjoinpath</b>(<i>a, *p</i>) |
803 <b>normabsjoinpath</b>(<i>a, *p</i>) |
804 |
|
805 <p> |
804 <p> |
806 Function returning a normalized, absolute path of the joined parts passed |
805 Function returning a normalized, absolute path of the joined parts passed |
807 into it. |
806 into it. |
808 </p> |
807 </p> |
|
808 |
809 <dl> |
809 <dl> |
810 |
810 |
811 <dt><i>a</i> (str)</dt> |
811 <dt><i>a</i> (str)</dt> |
812 <dd> |
812 <dd> |
813 first path to be joined |
813 first path to be joined |
833 <hr /> |
833 <hr /> |
834 <hr /> |
834 <hr /> |
835 <a NAME="normcaseabspath" ID="normcaseabspath"></a> |
835 <a NAME="normcaseabspath" ID="normcaseabspath"></a> |
836 <h2>normcaseabspath</h2> |
836 <h2>normcaseabspath</h2> |
837 <b>normcaseabspath</b>(<i>path</i>) |
837 <b>normcaseabspath</b>(<i>path</i>) |
838 |
|
839 <p> |
838 <p> |
840 Function returning an absolute path, that is normalized with respect to |
839 Function returning an absolute path, that is normalized with respect to |
841 its case and references. |
840 its case and references. |
842 </p> |
841 </p> |
|
842 |
843 <dl> |
843 <dl> |
844 |
844 |
845 <dt><i>path</i> (str)</dt> |
845 <dt><i>path</i> (str)</dt> |
846 <dd> |
846 <dd> |
847 file path |
847 file path |
863 <hr /> |
863 <hr /> |
864 <hr /> |
864 <hr /> |
865 <a NAME="normcasepath" ID="normcasepath"></a> |
865 <a NAME="normcasepath" ID="normcasepath"></a> |
866 <h2>normcasepath</h2> |
866 <h2>normcasepath</h2> |
867 <b>normcasepath</b>(<i>path</i>) |
867 <b>normcasepath</b>(<i>path</i>) |
868 |
|
869 <p> |
868 <p> |
870 Function returning a path, that is normalized with respect to its case |
869 Function returning a path, that is normalized with respect to its case |
871 and references. |
870 and references. |
872 </p> |
871 </p> |
|
872 |
873 <dl> |
873 <dl> |
874 |
874 |
875 <dt><i>path</i> (str)</dt> |
875 <dt><i>path</i> (str)</dt> |
876 <dd> |
876 <dd> |
877 file path |
877 file path |
893 <hr /> |
893 <hr /> |
894 <hr /> |
894 <hr /> |
895 <a NAME="normjoinpath" ID="normjoinpath"></a> |
895 <a NAME="normjoinpath" ID="normjoinpath"></a> |
896 <h2>normjoinpath</h2> |
896 <h2>normjoinpath</h2> |
897 <b>normjoinpath</b>(<i>a, *p</i>) |
897 <b>normjoinpath</b>(<i>a, *p</i>) |
898 |
|
899 <p> |
898 <p> |
900 Function returning a normalized path of the joined parts passed into it. |
899 Function returning a normalized path of the joined parts passed into it. |
901 </p> |
900 </p> |
|
901 |
902 <dl> |
902 <dl> |
903 |
903 |
904 <dt><i>a</i> (str)</dt> |
904 <dt><i>a</i> (str)</dt> |
905 <dd> |
905 <dd> |
906 first path to be joined |
906 first path to be joined |
926 <hr /> |
926 <hr /> |
927 <hr /> |
927 <hr /> |
928 <a NAME="plainFileName" ID="plainFileName"></a> |
928 <a NAME="plainFileName" ID="plainFileName"></a> |
929 <h2>plainFileName</h2> |
929 <h2>plainFileName</h2> |
930 <b>plainFileName</b>(<i>fileName</i>) |
930 <b>plainFileName</b>(<i>fileName</i>) |
931 |
|
932 <p> |
931 <p> |
933 Function to create a plain file name given a device or remote file name. |
932 Function to create a plain file name given a device or remote file name. |
934 </p> |
933 </p> |
|
934 |
935 <dl> |
935 <dl> |
936 |
936 |
937 <dt><i>fileName</i> (str)</dt> |
937 <dt><i>fileName</i> (str)</dt> |
938 <dd> |
938 <dd> |
939 device or remote file name |
939 device or remote file name |
955 <hr /> |
955 <hr /> |
956 <hr /> |
956 <hr /> |
957 <a NAME="relativeUniversalPath" ID="relativeUniversalPath"></a> |
957 <a NAME="relativeUniversalPath" ID="relativeUniversalPath"></a> |
958 <h2>relativeUniversalPath</h2> |
958 <h2>relativeUniversalPath</h2> |
959 <b>relativeUniversalPath</b>(<i>path, start</i>) |
959 <b>relativeUniversalPath</b>(<i>path, start</i>) |
960 |
|
961 <p> |
960 <p> |
962 Function to convert a file path to a path relative to a start path |
961 Function to convert a file path to a path relative to a start path |
963 with universal separators. |
962 with universal separators. |
964 </p> |
963 </p> |
|
964 |
965 <dl> |
965 <dl> |
966 |
966 |
967 <dt><i>path</i> (str)</dt> |
967 <dt><i>path</i> (str)</dt> |
968 <dd> |
968 <dd> |
969 file or directory name to convert |
969 file or directory name to convert |
990 <hr /> |
990 <hr /> |
991 <hr /> |
991 <hr /> |
992 <a NAME="remoteFileName" ID="remoteFileName"></a> |
992 <a NAME="remoteFileName" ID="remoteFileName"></a> |
993 <h2>remoteFileName</h2> |
993 <h2>remoteFileName</h2> |
994 <b>remoteFileName</b>(<i>fileName</i>) |
994 <b>remoteFileName</b>(<i>fileName</i>) |
995 |
|
996 <p> |
995 <p> |
997 Function to create a remote file name given a plain file name. |
996 Function to create a remote file name given a plain file name. |
998 </p> |
997 </p> |
|
998 |
999 <dl> |
999 <dl> |
1000 |
1000 |
1001 <dt><i>fileName</i> (str)</dt> |
1001 <dt><i>fileName</i> (str)</dt> |
1002 <dd> |
1002 <dd> |
1003 plain file name |
1003 plain file name |
1019 <hr /> |
1019 <hr /> |
1020 <hr /> |
1020 <hr /> |
1021 <a NAME="samefilepath" ID="samefilepath"></a> |
1021 <a NAME="samefilepath" ID="samefilepath"></a> |
1022 <h2>samefilepath</h2> |
1022 <h2>samefilepath</h2> |
1023 <b>samefilepath</b>(<i>f1, f2, followSymlinks=True</i>) |
1023 <b>samefilepath</b>(<i>f1, f2, followSymlinks=True</i>) |
1024 |
|
1025 <p> |
1024 <p> |
1026 Function to compare two paths. Strips the filename. |
1025 Function to compare two paths. Strips the filename. |
1027 </p> |
1026 </p> |
|
1027 |
1028 <dl> |
1028 <dl> |
1029 |
1029 |
1030 <dt><i>f1</i> (str)</dt> |
1030 <dt><i>f1</i> (str)</dt> |
1031 <dd> |
1031 <dd> |
1032 first filepath for the compare |
1032 first filepath for the compare |
1058 <hr /> |
1058 <hr /> |
1059 <hr /> |
1059 <hr /> |
1060 <a NAME="samepath" ID="samepath"></a> |
1060 <a NAME="samepath" ID="samepath"></a> |
1061 <h2>samepath</h2> |
1061 <h2>samepath</h2> |
1062 <b>samepath</b>(<i>f1, f2, followSymlinks=True</i>) |
1062 <b>samepath</b>(<i>f1, f2, followSymlinks=True</i>) |
1063 |
|
1064 <p> |
1063 <p> |
1065 Function to compare two paths. |
1064 Function to compare two paths. |
1066 </p> |
1065 </p> |
|
1066 |
1067 <dl> |
1067 <dl> |
1068 |
1068 |
1069 <dt><i>f1</i> (str)</dt> |
1069 <dt><i>f1</i> (str)</dt> |
1070 <dd> |
1070 <dd> |
1071 first filepath for the compare |
1071 first filepath for the compare |
1126 <hr /> |
1126 <hr /> |
1127 <hr /> |
1127 <hr /> |
1128 <a NAME="startfile" ID="startfile"></a> |
1128 <a NAME="startfile" ID="startfile"></a> |
1129 <h2>startfile</h2> |
1129 <h2>startfile</h2> |
1130 <b>startfile</b>(<i>filePath</i>) |
1130 <b>startfile</b>(<i>filePath</i>) |
1131 |
|
1132 <p> |
1131 <p> |
1133 Function to open the given file path with the system default application. |
1132 Function to open the given file path with the system default application. |
1134 </p> |
1133 </p> |
|
1134 |
1135 <dl> |
1135 <dl> |
1136 |
1136 |
1137 <dt><i>filePath</i> (str or Path)</dt> |
1137 <dt><i>filePath</i> (str or Path)</dt> |
1138 <dd> |
1138 <dd> |
1139 file path to be opened |
1139 file path to be opened |
1155 <hr /> |
1155 <hr /> |
1156 <hr /> |
1156 <hr /> |
1157 <a NAME="startswithPath" ID="startswithPath"></a> |
1157 <a NAME="startswithPath" ID="startswithPath"></a> |
1158 <h2>startswithPath</h2> |
1158 <h2>startswithPath</h2> |
1159 <b>startswithPath</b>(<i>path, start</i>) |
1159 <b>startswithPath</b>(<i>path, start</i>) |
1160 |
|
1161 <p> |
1160 <p> |
1162 Function to check, if a path starts with a given start path. |
1161 Function to check, if a path starts with a given start path. |
1163 </p> |
1162 </p> |
|
1163 |
1164 <dl> |
1164 <dl> |
1165 |
1165 |
1166 <dt><i>path</i> (str)</dt> |
1166 <dt><i>path</i> (str)</dt> |
1167 <dd> |
1167 <dd> |
1168 path to be checked |
1168 path to be checked |
1189 <hr /> |
1189 <hr /> |
1190 <hr /> |
1190 <hr /> |
1191 <a NAME="toNativeSeparators" ID="toNativeSeparators"></a> |
1191 <a NAME="toNativeSeparators" ID="toNativeSeparators"></a> |
1192 <h2>toNativeSeparators</h2> |
1192 <h2>toNativeSeparators</h2> |
1193 <b>toNativeSeparators</b>(<i>path</i>) |
1193 <b>toNativeSeparators</b>(<i>path</i>) |
1194 |
|
1195 <p> |
1194 <p> |
1196 Function returning a path, that is using native separator characters. |
1195 Function returning a path, that is using native separator characters. |
1197 </p> |
1196 </p> |
|
1197 |
1198 <dl> |
1198 <dl> |
1199 |
1199 |
1200 <dt><i>path</i> (str)</dt> |
1200 <dt><i>path</i> (str)</dt> |
1201 <dd> |
1201 <dd> |
1202 path to be converted |
1202 path to be converted |