1 /* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */
2 /* vim: set ts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
5 * You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef mozilla_dom_FileSystemUtils_h
8 #define mozilla_dom_FileSystemUtils_h
15 #define FILESYSTEM_DOM_PATH_SEPARATOR "/"
18 * This class is for error handling.
19 * All methods in this class are static.
25 * Convert the path separator to "/".
28 LocalPathToNormalizedPath(const nsAString
& aLocal
, nsAString
& aNorm
);
31 * Convert the normalized path separator "/" to the system dependent path
32 * separator, which is "/" on Mac and Linux, and "\" on Windows.
35 NormalizedPathToLocalPath(const nsAString
& aNorm
, nsAString
& aLocal
);
38 * Return true if aDescendantPath is a descendant of aPath. Both aPath and
39 * aDescendantPath are absolute DOM path.
42 IsDescendantPath(const nsAString
& aPath
, const nsAString
& aDescendantPath
);
47 static const char16_t kSeparatorChar
= char16_t('/');
51 } // namespace mozilla
53 #endif // mozilla_dom_FileSystemUtils_h