Skip to content

Commit eb402e3

Browse files
committed
Normalize spelling
Note that "UNIX" is a trademark, "Unix" is not
1 parent 9e224a5 commit eb402e3

10 files changed

Lines changed: 59 additions & 59 deletions

File tree

src/main/java/org/apache/commons/io/FileSystemUtils.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public class FileSystemUtils {
5353
* FileSystemUtils.freeSpace("/volume"); // *nix
5454
* </pre>
5555
*
56-
* @param path the path to get free space for, not null, not empty on UNIX
56+
* @param path the path to get free space for, not null, not empty on Unix
5757
* @return the amount of free drive space on the drive or volume
5858
* @throws IOException if an I/O error occurs.
5959
* @throws IllegalArgumentException if the path is invalid.
@@ -116,7 +116,7 @@ public static long freeSpaceKb(final long timeout) throws IOException {
116116
* FileSystemUtils.freeSpaceKb("/volume"); // *nix
117117
* </pre>
118118
*
119-
* @param path the path to get free space for, not null, not empty on UNIX
119+
* @param path the path to get free space for, not null, not empty on Unix
120120
* @return the amount of free drive space on the drive or volume in kilobytes
121121
* @throws IOException if an I/O error occurs.
122122
* @throws IllegalArgumentException if the path is invalid.
@@ -136,7 +136,7 @@ public static long freeSpaceKb(final String path) throws IOException {
136136
* FileSystemUtils.freeSpaceKb("/volume"); // *nix
137137
* </pre>
138138
*
139-
* @param path the path to get free space for, not null, not empty on UNIX
139+
* @param path the path to get free space for, not null, not empty on Unix
140140
* @param timeout ignored.
141141
* @return the amount of free drive space on the drive or volume in kilobytes
142142
* @throws IOException if an I/O error occurs.
@@ -157,7 +157,7 @@ public static long freeSpaceKb(final String path, final long timeout) throws IOE
157157
* FileSystemUtils.freeSpace("/volume"); // *nix
158158
* </pre>
159159
*
160-
* @param pathStr the path to get free space for, not null, not empty on UNIX
160+
* @param pathStr the path to get free space for, not null, not empty on Unix
161161
* @return the amount of free drive space on the drive or volume
162162
* @throws IOException if an I/O error occurs.
163163
* @throws IllegalArgumentException if the path is invalid.

src/main/java/org/apache/commons/io/FileUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3122,7 +3122,7 @@ private static SuffixFileFilter toSuffixFileFilter(final String... extensions) {
31223122
}
31233123

31243124
/**
3125-
* Implements behavior similar to the UNIX "touch" utility. Creates a new file with size 0, or, if the file exists, just
3125+
* Implements behavior similar to the Unix "touch" utility. Creates a new file with size 0, or, if the file exists, just
31263126
* updates the file's modified time. This method throws an IOException if the last modified date
31273127
* of the file cannot be set. It creates parent directories if they do not exist.
31283128
*

src/main/java/org/apache/commons/io/FilenameUtils.java

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
* ever accesses the file system, or depends on whether a path points to a file that exists.
3434
* <p>
3535
* When dealing with file names, you can hit problems when moving from a Windows
36-
* based development machine to a UNIX based production machine.
36+
* based development machine to a Unix based production machine.
3737
* This class aims to help avoid those problems.
3838
* </p>
3939
* <p>
@@ -42,7 +42,7 @@
4242
* {@link File#File(java.io.File, String) File(File,String)}.
4343
* </p>
4444
* <p>
45-
* Most methods in this class are designed to work the same on both UNIX and Windows.
45+
* Most methods in this class are designed to work the same on both Unix and Windows.
4646
* Those that don't include 'System', 'Unix', or 'Windows' in their name.
4747
* </p>
4848
* <p>
@@ -63,7 +63,7 @@
6363
* <li>the extension - txt</li>
6464
* </ul>
6565
* <p>
66-
* Given an absolute UNIX path such as /dev/project/file.txt they are:
66+
* Given an absolute Unix path such as /dev/project/file.txt they are:
6767
* </p>
6868
* <ul>
6969
* <li>the full file name, or just file name - /dev/project/file.txt</li>
@@ -87,7 +87,7 @@
8787
* <li>the extension - txt</li>
8888
* </ul>
8989
* <p>
90-
* Given an absolute UNIX path such as /dev/project/file.txt they are:
90+
* Given an absolute Unix path such as /dev/project/file.txt they are:
9191
* </p>
9292
* <ul>
9393
* <li>the full path, full file name, or just file name - /dev/project/file.txt</li>
@@ -107,7 +107,7 @@
107107
* that do not end with a separator as files, not directories.
108108
* </p>
109109
* <p>
110-
* This class only supports UNIX and Windows style names.
110+
* This class only supports Unix and Windows style names.
111111
* Prefixes are matched as follows:
112112
* </p>
113113
* <pre>
@@ -154,7 +154,7 @@ public class FilenameUtils {
154154
public static final String EXTENSION_SEPARATOR_STR = Character.toString(EXTENSION_SEPARATOR);
155155

156156
/**
157-
* The UNIX separator character.
157+
* The Unix separator character.
158158
*/
159159
private static final char UNIX_NAME_SEPARATOR = '/';
160160

@@ -205,7 +205,7 @@ public class FilenameUtils {
205205
* Otherwise, the paths will be joined, normalized and returned.
206206
* </p>
207207
* <p>
208-
* The output will be the same on both UNIX and Windows except
208+
* The output will be the same on both Unix and Windows except
209209
* for the separator character.
210210
* </p>
211211
* <pre>
@@ -524,7 +524,7 @@ public static boolean equalsNormalized(final String fileName1, final String file
524524
* after both have been normalized.
525525
* <p>
526526
* Both file names are first passed to {@link #normalize(String)}.
527-
* The check is then performed case-sensitively on UNIX and
527+
* The check is then performed case-sensitively on Unix and
528528
* case-insensitively on Windows.
529529
* </p>
530530
*
@@ -541,7 +541,7 @@ public static boolean equalsNormalizedOnSystem(final String fileName1, final Str
541541
* Checks whether two file names are equal using the case rules of the system.
542542
* <p>
543543
* No processing is performed on the file names other than comparison.
544-
* The check is case-sensitive on UNIX and case-insensitive on Windows.
544+
* The check is case-sensitive on Unix and case-insensitive on Windows.
545545
* </p>
546546
*
547547
* @param fileName1 the first file name, may be null
@@ -594,7 +594,7 @@ private static int getAdsCriticalOffset(final String fileName) {
594594
/**
595595
* Gets the base name, minus the full path and extension, from a full file name.
596596
* <p>
597-
* This method will handle a path in either UNIX or Windows format.
597+
* This method will handle a path in either Unix or Windows format.
598598
* The text after the last forward or backslash and before the last dot is returned.
599599
* </p>
600600
* <pre>
@@ -661,7 +661,7 @@ public static String getExtension(final String fileName) throws IllegalArgumentE
661661
/**
662662
* Gets the full path (prefix + path) from a full file name.
663663
* <p>
664-
* This method will handle a file in either UNIX or Windows format.
664+
* This method will handle a file in either Unix or Windows format.
665665
* The method is entirely text based, and returns the text before and
666666
* including the last forward or backslash.
667667
* </p>
@@ -694,7 +694,7 @@ public static String getFullPath(final String fileName) {
694694
* Gets the full path (prefix + path) from a full file name,
695695
* excluding the final directory separator.
696696
* <p>
697-
* This method will handle a file in either UNIX or Windows format.
697+
* This method will handle a file in either Unix or Windows format.
698698
* The method is entirely text based, and returns the text before the
699699
* last forward or backslash.
700700
* </p>
@@ -726,7 +726,7 @@ public static String getFullPathNoEndSeparator(final String fileName) {
726726
/**
727727
* Gets the name minus the path from a full file name.
728728
* <p>
729-
* This method will handle a file in either UNIX or Windows format.
729+
* This method will handle a file in either Unix or Windows format.
730730
* The text after the last forward or backslash is returned.
731731
* </p>
732732
* <pre>
@@ -754,7 +754,7 @@ public static String getName(final String fileName) {
754754
/**
755755
* Gets the path from a full file name, which excludes the prefix and the name.
756756
* <p>
757-
* This method will handle a file in either UNIX or Windows format.
757+
* This method will handle a file in either Unix or Windows format.
758758
* The method is entirely text based, and returns the text before and
759759
* including the last forward or backslash.
760760
* </p>
@@ -785,7 +785,7 @@ public static String getPath(final String fileName) {
785785
* Gets the path (which excludes the prefix) from a full file name, and
786786
* also excluding the final directory separator.
787787
* <p>
788-
* This method will handle a file in either UNIX or Windows format.
788+
* This method will handle a file in either Unix or Windows format.
789789
* The method is entirely text based, and returns the text before the
790790
* last forward or backslash.
791791
* </p>
@@ -815,7 +815,7 @@ public static String getPathNoEndSeparator(final String fileName) {
815815
/**
816816
* Gets the prefix such as {@code C:/} or {@code ~/} from a full file name,
817817
* <p>
818-
* This method will handle a file in either UNIX or Windows format.
818+
* This method will handle a file in either Unix or Windows format.
819819
* The prefix includes the first slash in the full file name where applicable.
820820
* </p>
821821
* <pre>
@@ -836,7 +836,7 @@ public static String getPathNoEndSeparator(final String fileName) {
836836
* </pre>
837837
* <p>
838838
* The output will be the same irrespective of the machine that the code is running on.
839-
* ie. both UNIX and Windows prefixes are matched regardless.
839+
* ie. both Unix and Windows prefixes are matched regardless.
840840
* </p>
841841
*
842842
* @param fileName the file name, null returns null
@@ -861,7 +861,7 @@ public static String getPrefix(final String fileName) {
861861
/**
862862
* Returns the length of the file name prefix, such as {@code C:/} or {@code ~/}.
863863
* <p>
864-
* This method will handle a file in either UNIX or Windows format.
864+
* This method will handle a file in either Unix or Windows format.
865865
* </p>
866866
* <p>
867867
* The prefix length includes the first slash in the full file name
@@ -890,7 +890,7 @@ public static String getPrefix(final String fileName) {
890890
* </pre>
891891
* <p>
892892
* The output will be the same irrespective of the machine that the code is running on.
893-
* ie. both UNIX and Windows prefixes are matched regardless.
893+
* ie. both Unix and Windows prefixes are matched regardless.
894894
* </p>
895895
* <p>
896896
* Note that a leading // (or \\) is used to indicate a UNC name on Windows.
@@ -966,7 +966,7 @@ public static int getPrefixLength(final String fileName) {
966966
* Returns the index of the last extension separator character, which is a dot.
967967
* <p>
968968
* This method also checks that there is no directory separator after the last dot. To do this it uses
969-
* {@link #indexOfLastSeparator(String)} which will handle a file in either UNIX or Windows format.
969+
* {@link #indexOfLastSeparator(String)} which will handle a file in either Unix or Windows format.
970970
* </p>
971971
* <p>
972972
* The output will be the same irrespective of the machine that the code is running on, with the
@@ -1003,7 +1003,7 @@ public static int indexOfExtension(final String fileName) throws IllegalArgument
10031003
/**
10041004
* Returns the index of the last directory separator character.
10051005
* <p>
1006-
* This method will handle a file in either UNIX or Windows format.
1006+
* This method will handle a file in either Unix or Windows format.
10071007
* The position of the last forward or backslash is returned.
10081008
* <p>
10091009
* The output will be the same irrespective of the machine that the code is running on.
@@ -1256,7 +1256,7 @@ private static boolean isValidHostName(final String name) {
12561256
* Normalizes a path, removing double and single dot path steps.
12571257
* <p>
12581258
* This method normalizes a path to a standard format.
1259-
* The input may contain separators in either UNIX or Windows format.
1259+
* The input may contain separators in either Unix or Windows format.
12601260
* The output will contain separators in the format of the system.
12611261
* <p>
12621262
* A trailing slash will be retained.
@@ -1265,7 +1265,7 @@ private static boolean isValidHostName(final String name) {
12651265
* A double dot will cause that path segment and the one before to be removed.
12661266
* If the double dot has no parent path segment, {@code null} is returned.
12671267
* <p>
1268-
* The output will be the same on both UNIX and Windows except
1268+
* The output will be the same on both Unix and Windows except
12691269
* for the separator character.
12701270
* <pre>
12711271
* /foo// --&gt; /foo/
@@ -1300,7 +1300,7 @@ public static String normalize(final String fileName) {
13001300
* Normalizes a path, removing double and single dot path steps.
13011301
* <p>
13021302
* This method normalizes a path to a standard format.
1303-
* The input may contain separators in either UNIX or Windows format.
1303+
* The input may contain separators in either Unix or Windows format.
13041304
* The output will contain separators in the format specified.
13051305
* <p>
13061306
* A trailing slash will be retained.
@@ -1310,7 +1310,7 @@ public static String normalize(final String fileName) {
13101310
* If the double dot has no parent path segment to work with, {@code null}
13111311
* is returned.
13121312
* <p>
1313-
* The output will be the same on both UNIX and Windows except
1313+
* The output will be the same on both Unix and Windows except
13141314
* for the separator character.
13151315
* <pre>
13161316
* /foo// --&gt; /foo/
@@ -1331,11 +1331,11 @@ public static String normalize(final String fileName) {
13311331
* ~/foo/../bar/ --&gt; ~/bar/
13321332
* ~/../bar --&gt; null
13331333
* </pre>
1334-
* The output will be the same on both UNIX and Windows including
1334+
* The output will be the same on both Unix and Windows including
13351335
* the separator character.
13361336
*
13371337
* @param fileName the file name to normalize, null returns null
1338-
* @param unixSeparator {@code true} if a UNIX separator should
1338+
* @param unixSeparator {@code true} if a Unix separator should
13391339
* be used or {@code false} if a Windows separator should be used.
13401340
* @return the normalized fileName, or null if invalid
13411341
* @throws IllegalArgumentException if the file name contains the null character ({@code U+0000})
@@ -1350,7 +1350,7 @@ public static String normalize(final String fileName, final boolean unixSeparato
13501350
* and removing any final directory separator.
13511351
* <p>
13521352
* This method normalizes a path to a standard format.
1353-
* The input may contain separators in either UNIX or Windows format.
1353+
* The input may contain separators in either Unix or Windows format.
13541354
* The output will contain separators in the format of the system.
13551355
* <p>
13561356
* A trailing slash will be removed.
@@ -1360,7 +1360,7 @@ public static String normalize(final String fileName, final boolean unixSeparato
13601360
* If the double dot has no parent path segment to work with, {@code null}
13611361
* is returned.
13621362
* <p>
1363-
* The output will be the same on both UNIX and Windows except
1363+
* The output will be the same on both Unix and Windows except
13641364
* for the separator character.
13651365
* <pre>
13661366
* /foo// --&gt; /foo
@@ -1396,7 +1396,7 @@ public static String normalizeNoEndSeparator(final String fileName) {
13961396
* and removing any final directory separator.
13971397
* <p>
13981398
* This method normalizes a path to a standard format.
1399-
* The input may contain separators in either UNIX or Windows format.
1399+
* The input may contain separators in either Unix or Windows format.
14001400
* The output will contain separators in the format specified.
14011401
* <p>
14021402
* A trailing slash will be removed.
@@ -1406,7 +1406,7 @@ public static String normalizeNoEndSeparator(final String fileName) {
14061406
* If the double dot has no parent path segment to work with, {@code null}
14071407
* is returned.
14081408
* <p>
1409-
* The output will be the same on both UNIX and Windows including
1409+
* The output will be the same on both Unix and Windows including
14101410
* the separator character.
14111411
* <pre>
14121412
* /foo// --&gt; /foo
@@ -1429,7 +1429,7 @@ public static String normalizeNoEndSeparator(final String fileName) {
14291429
* </pre>
14301430
*
14311431
* @param fileName the file name to normalize, null returns null
1432-
* @param unixSeparator {@code true} if a UNIX separator should
1432+
* @param unixSeparator {@code true} if a Unix separator should
14331433
* be used or {@code false} if a Windows separator should be used.
14341434
* @return the normalized fileName, or null if invalid
14351435
* @throws IllegalArgumentException if the file name contains the null character ({@code U+0000})
@@ -1500,7 +1500,7 @@ public static String separatorsToSystem(final String path) {
15001500
}
15011501

15021502
/**
1503-
* Converts all separators to the UNIX separator of forward slash.
1503+
* Converts all separators to the Unix separator of forward slash.
15041504
*
15051505
* @param path the path to be changed, null ignored.
15061506
* @return the new path.
@@ -1697,7 +1697,7 @@ public static boolean wildcardMatch(final String fileName, final String wildcard
16971697
* The wildcard matcher uses the characters '?' and '*' to represent a
16981698
* single or multiple (zero or more) wildcard characters.
16991699
* This is the same as often found on DOS/Unix command lines.
1700-
* The check is case-sensitive on UNIX and case-insensitive on Windows.
1700+
* The check is case-sensitive on Unix and case-insensitive on Windows.
17011701
* <pre>
17021702
* wildcardMatch("c.txt", "*.txt") --&gt; true
17031703
* wildcardMatch("c.txt", "*.jpg") --&gt; false

src/main/java/org/apache/commons/io/IOCase.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
* Enumeration of IO case sensitivity.
2525
* <p>
2626
* Different filing systems have different rules for case-sensitivity.
27-
* Windows is case-insensitive, UNIX is case-sensitive.
27+
* Windows is case-insensitive, Unix is case-sensitive.
2828
* </p>
2929
* <p>
3030
* This class captures that difference, providing an enumeration to
@@ -52,11 +52,11 @@ public enum IOCase {
5252

5353
/**
5454
* The constant for case sensitivity determined by the current operating system.
55-
* Windows is case-insensitive when comparing file names, UNIX is case-sensitive.
55+
* Windows is case-insensitive when comparing file names, Unix is case-sensitive.
5656
* <p>
5757
* <strong>Note:</strong> This only caters for Windows and Unix. Other operating
5858
* systems (e.g. OSX and OpenVMS) are treated as case-sensitive if they use the
59-
* UNIX file separator and case-insensitive if they use the Windows file separator
59+
* Unix file separator and case-insensitive if they use the Windows file separator
6060
* (see {@link File#separatorChar}).
6161
* </p>
6262
* <p>

src/main/java/org/apache/commons/io/IOUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ public class IOUtils {
149149
public static final char DIR_SEPARATOR = File.separatorChar;
150150

151151
/**
152-
* The UNIX directory separator character '{@value}'.
152+
* The Unix directory separator character '{@value}'.
153153
*/
154154
public static final char DIR_SEPARATOR_UNIX = '/';
155155

@@ -187,7 +187,7 @@ public class IOUtils {
187187
public static final String LINE_SEPARATOR = System.lineSeparator();
188188

189189
/**
190-
* The UNIX line separator string.
190+
* The Unix line separator string.
191191
*
192192
* @see StandardLineSeparator#LF
193193
*/

src/main/java/org/apache/commons/io/file/PathUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1689,7 +1689,7 @@ static Set<FileVisitOption> toFileVisitOptionSet(final FileVisitOption... fileVi
16891689
}
16901690

16911691
/**
1692-
* Implements behavior similar to the UNIX "touch" utility. Creates a new file with size 0, or, if the file exists, just updates the file's modified time.
1692+
* Implements behavior similar to the Unix "touch" utility. Creates a new file with size 0, or, if the file exists, just updates the file's modified time.
16931693
* this method creates parent directories if they do not exist.
16941694
*
16951695
* @param file the file to touch.

0 commit comments

Comments
 (0)