Skip to content

Commit

Permalink
Fat fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesbetros committed Sep 11, 2016
1 parent c7fda23 commit b3737d7
Showing 1 changed file with 56 additions and 48 deletions.
104 changes: 56 additions & 48 deletions source/Cosmos.System/FileSystem/VFS/VFSManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public static void DeleteDirectory(string aPath, bool recursive)
if (xDirectoryListing.Count > 0 && !recursive)
throw new IOException("Directory is not empty");

if(recursive)
if (recursive)
{
foreach (var entry in xDirectoryListing)
{
Expand Down Expand Up @@ -437,44 +437,48 @@ public static char GetDirectorySeparatorChar()

public static char[] GetInvalidFileNameChars()
{
char[] xReturn = new char[17];
xReturn[0] = '"';
xReturn[1] = '<';
xReturn[2] = '>';
xReturn[3] = '|';
xReturn[4] = '\0';
xReturn[5] = '\a';
xReturn[6] = '\b';
xReturn[7] = '\t';
xReturn[8] = '\n';
xReturn[9] = '\v';
xReturn[10] = '\f';
xReturn[11] = '\r';
xReturn[12] = ':';
xReturn[13] = '*';
xReturn[14] = '?';
xReturn[15] = '\\';
xReturn[16] = '/';
char[] xReturn =
{
'"',
'<',
'>',
'|',
'\0',
'\a',
'\b',
'\t',
'\n',
'\v',
'\f',
'\r',
':',
'*',
'?',
'\\',
'/'
};
return xReturn;
}

public static char[] GetInvalidPathCharsWithAdditionalChecks()
{
char[] xReturn = new char[14];
xReturn[0] = '"';
xReturn[1] = '<';
xReturn[2] = '>';
xReturn[3] = '|';
xReturn[4] = '\0';
xReturn[5] = '\a';
xReturn[6] = '\b';
xReturn[7] = '\t';
xReturn[8] = '\n';
xReturn[9] = '\v';
xReturn[10] = '\f';
xReturn[11] = '\r';
xReturn[12] = '*';
xReturn[13] = '?';
char[] xReturn =
{
'"',
'<',
'>',
'|',
'\0',
'\a',
'\b',
'\t',
'\n',
'\v',
'\f',
'\r',
'*',
'?'
};
return xReturn;
}

Expand All @@ -485,25 +489,29 @@ public static char GetPathSeparator()

public static char[] GetRealInvalidPathChars()
{
char[] xReturn = new char[12];
xReturn[0] = '"';
xReturn[1] = '<';
xReturn[2] = '>';
xReturn[3] = '|';
char[] xReturn =
{
'"',
'<',
'>',
'|'
};
return xReturn;
}

public static char[] GetTrimEndChars()
{
char[] xReturn = new char[8];
xReturn[0] = (char)0x9;
xReturn[1] = (char)0xA;
xReturn[2] = (char)0xB;
xReturn[3] = (char)0xC;
xReturn[4] = (char)0xD;
xReturn[5] = (char)0x20;
xReturn[6] = (char)0x85;
xReturn[7] = (char)0xA0;
char[] xReturn =
{
(char) 0x9,
(char) 0xA,
(char) 0xB,
(char) 0xC,
(char) 0xD,
(char) 0x20,
(char) 0x85,
(char) 0xA0
};
return xReturn;
}

Expand Down

0 comments on commit b3737d7

Please sign in to comment.