85 File& operator= (
const String& newAbsolutePath);
88 File& operator= (
const File& otherFile);
110 bool existsAsFile() const;
118 bool isDirectory() const;
132 int64 getSize() const;
139 static
String descriptionOfSizeInBytes (int64 bytes);
153 const
String& getFullPathName() const noexcept {
return fullPath; }
168 String getFileName()
const;
185 String getRelativePathFrom (
const File& directoryToBeRelativeTo)
const;
196 String getFileExtension()
const;
209 bool hasFileExtension (
StringRef extensionToTest)
const;
229 String getFileNameWithoutExtension()
const;
237 int hashCode()
const;
244 int64 hashCode64()
const;
279 File getParentDirectory()
const;
290 bool isAChildOf (
const File& potentialParentDirectory)
const;
310 File getNonexistentChildFile (
const String& prefix,
312 bool putNumbersInBrackets =
true)
const;
323 File getNonexistentSibling (
bool putNumbersInBrackets =
true)
const;
327 bool operator== (
const File&)
const;
329 bool operator!= (
const File&)
const;
331 bool operator< (
const File&)
const;
333 bool operator> (
const File&)
const;
360 bool setReadOnly (
bool shouldBeReadOnly,
361 bool applyRecursively =
false)
const;
368 bool setExecutePermission (
bool shouldBeExecutable)
const;
389 Time getLastModificationTime()
const;
396 Time getLastAccessTime()
const;
403 Time getCreationTime()
const;
411 bool setLastModificationTime (
Time newTime)
const;
419 bool setLastAccessTime (
Time newTime)
const;
427 bool setCreationTime (
Time newTime)
const;
463 Result createDirectory()
const;
491 bool deleteRecursively (
bool followSymlinks =
false)
const;
519 bool moveFileTo (
const File& targetLocation)
const;
531 bool copyFileTo (
const File& targetLocation)
const;
543 bool replaceFileIn (
const File& targetLocation)
const;
558 bool copyDirectoryTo (
const File& newDirectory)
const;
567 findFilesAndDirectories = 3,
568 ignoreHiddenFiles = 4
606 bool searchRecursively,
607 const String& wildCardPattern =
"*",
608 FollowSymlinks followSymlinks = FollowSymlinks::yes)
const;
615 int findChildFiles (
Array<File>& results,
int whatToLookFor,
616 bool searchRecursively,
const String& wildCardPattern =
"*",
617 FollowSymlinks followSymlinks = FollowSymlinks::yes)
const;
636 int getNumberOfChildFiles (
int whatToLookFor,
637 const String& wildCardPattern =
"*")
const;
642 bool containsSubDirectories()
const;
662 std::unique_ptr<FileInputStream> createInputStream()
const;
695 std::unique_ptr<FileOutputStream> createOutputStream (
size_t bufferSize = 0x8000)
const;
717 String loadFileAsString()
const;
731 bool appendData (
const void* dataToAppend,
732 size_t numberOfBytes)
const;
748 bool replaceWithData (
const void* dataToWrite,
749 size_t numberOfBytes)
const;
764 bool appendText (
const String& textToAppend,
765 bool asUnicode =
false,
766 bool writeUnicodeHeaderBytes =
false,
767 const char* lineEndings =
"\r\n")
const;
785 bool replaceWithText (
const String& textToWrite,
786 bool asUnicode =
false,
787 bool writeUnicodeHeaderBytes =
false,
788 const char* lineEndings =
"\r\n")
const;
793 bool hasIdenticalContentTo (
const File& other)
const;
856 bool startAsProcess (
const String& parameters =
String())
const;
954 #if JUCE_WINDOWS || DOXYGEN
956 windowsSystemDirectory,
965 #if JUCE_WINDOWS || DOXYGEN
973 globalApplicationsDirectoryX86,
1032 static String createLegalFileName (
const String& fileNameToFix);
1041 static String createLegalPathName (
const String& pathNameToFix);
1044 static bool areFileNamesCaseSensitive();
1047 static bool isAbsolutePath (
StringRef path);
1054 static File createFileWithoutCheckingPath (
const String& absolutePath)
noexcept;
1057 static String addTrailingSeparator (
const String& path);
1061 bool createSymbolicLink (
const File& linkFileToCreate,
bool overwriteExisting)
const;
1069 File getLinkedTarget()
const;
1076 static bool createSymbolicLink (
const File& linkFileToCreate,
1077 const String& nativePathOfTarget,
1078 bool overwriteExisting);
1084 #if JUCE_WINDOWS || DOXYGEN
1086 bool createShortcut (
const String& description,
const File& linkFileToCreate)
const;
1089 bool isShortcut()
const;
1095 #if JUCE_MAC || JUCE_IOS || DOXYGEN
1097 OSType getMacOSType()
const;
1100 bool isBundle()
const;
1103 #if JUCE_MAC || DOXYGEN
1105 void addToDock()
const;
1108 #if JUCE_MAC || JUCE_IOS
1116 static File getContainerForSecurityApplicationGroupIdentifier (
const String& appGroup);
1123 NaturalFileComparator (
bool shouldPutFoldersFirst) noexcept : foldersFirst (shouldPutFoldersFirst) {}
1125 int compareElements (
const File& firstFile,
const File& secondFile)
const
1130 #if NAMES_ARE_CASE_SENSITIVE
1140 #if JUCE_ALLOW_STATIC_NULL_VARIABLES && ! defined (DOXYGEN)
1146 [[deprecated]]
static const juce_wchar separator;
1147 [[deprecated]]
static const StringRef separatorString;
1148 [[deprecated]]
static const File nonexistent;
1156 String getPathUpToLastSlash()
const;
1157 bool isNonEmptyDirectory()
const;
1160 bool copyInternal (
const File&)
const;
1161 bool moveInternal (
const File&)
const;
1162 bool replaceInternal (
const File&)
const;
1163 bool setFileTimesInternal (int64 m, int64 a, int64 c)
const;
1164 void getFileTimesInternal (int64& m, int64& a, int64& c)
const;
1165 bool setFileReadOnlyInternal (
bool)
const;
1166 bool setFileExecutableInternal (
bool)
const;