(* Content-type: application/vnd.wolfram.mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 11.3' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 158, 7] NotebookDataLength[ 15823, 451] NotebookOptionsPosition[ 12574, 370] NotebookOutlinePosition[ 12898, 386] CellTagsIndexPosition[ 12855, 383] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[CellGroupData[{ Cell["Basic Examples", "Subsection", CellID->285421464], Cell["Export a plot as a GIF:", "Text", CellID->75014804], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Export", "[", RowBox[{"\"\\"", ",", RowBox[{"Plot", "[", RowBox[{ RowBox[{"Sin", "[", "x", "]"}], ",", RowBox[{"{", RowBox[{"x", ",", "0", ",", "10"}], "}"}]}], "]"}]}], "]"}]], "Input", CellLabel->"In[128]:=", CellID->387778158], Cell[BoxData["\<\"test.gif\"\>"], "Output", CellChangeTimes->{3.7525060468010273`*^9}, CellLabel->"Out[128]=", CellID->33901254] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ InterpretationBox[ FrameBox[ TemplateBox[{GraphicsBox[{ RGBColor[0.9882352941176471, 0.4, 0.25098039215686274`], Thickness[ Dynamic[ If[CurrentValue["CellStyleName"] === "Input", 0.2, 0.1]]], CircleBox[{0, 0}]}, ImageSize -> 10, BaselinePosition -> Scaled[0.05], ImagePadding -> 1],TemplateBox[{3}, "Spacer1"],StyleBox[ "\"FileQ\"", FontColor -> RGBColor[0.2784313725490196, 0.2784313725490196, 0.2784313725490196], ShowAutoStyles -> False, ShowStringCharacters -> False, FontSize -> 0.78 Inherited, FontFamily -> "Roboto", Selectable -> True, FontWeight -> Dynamic[ If[CurrentValue["CellStyleName"] === "Input", "DemiBold", Plain]], StripOnInput -> False]}, "Row", DisplayFunction->(PaneBox[ RowBox[{ TemplateSlotSequence[1, "\[InvisibleSpace]"]}], BaselinePosition -> Center]& ), InterpretationFunction->(RowBox[{"Row", "[", RowBox[{ RowBox[{"{", TemplateSlotSequence[1, ","], "}"}], ",", RowBox[{"BaselinePosition", "\[Rule]", "Center"}]}], "]"}]& )], Selectable -> False, Background->RGBColor[ 0.9686274509803922, 0.9686274509803922, 0.9686274509803922], ContentPadding->False, FrameMargins->{{3, 4}, {0, -2}}, FrameStyle->Directive[ AbsoluteThickness[1], RGBColor[0.8627450980392157, 0.8627450980392157, 0.8627450980392157]], RoundingRadius->3, StripOnInput->False], ResourceFunction["FileQ"], BoxID -> "FileQ"], "[", "%", "]"}]], "Input", CellChangeTimes->{3.7525060547035646`*^9}, CellLabel->"In[129]:=", CellID->695209523], Cell[BoxData["True"], "Output", CellChangeTimes->{3.752506055364462*^9}, CellLabel->"Out[129]=", CellID->2128890558] }, Open ]], Cell["Create an empty file:", "Text", CellChangeTimes->{{3.752506117072159*^9, 3.752506121027295*^9}, { 3.7525065311183777`*^9, 3.752506565712825*^9}, {3.752506792025092*^9, 3.7525067972173986`*^9}}, CellID->221583938], Cell[BoxData[ RowBox[{"Put", "[", RowBox[{"FileNameJoin", "[", RowBox[{"{", RowBox[{"$TemporaryDirectory", ",", "\"\\""}], "}"}], "]"}], "]"}]], "Input", CellChangeTimes->{3.752506657772579*^9}, CellLabel->"In[144]:=", CellID->1934183775], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ InterpretationBox[ FrameBox[ TemplateBox[{GraphicsBox[{ RGBColor[0.9882352941176471, 0.4, 0.25098039215686274`], Thickness[ Dynamic[ If[CurrentValue["CellStyleName"] === "Input", 0.2, 0.1]]], CircleBox[{0, 0}]}, ImageSize -> 10, BaselinePosition -> Scaled[0.05], ImagePadding -> 1],TemplateBox[{3}, "Spacer1"],StyleBox[ "\"FileQ\"", FontColor -> RGBColor[0.2784313725490196, 0.2784313725490196, 0.2784313725490196], ShowAutoStyles -> False, ShowStringCharacters -> False, FontSize -> 0.78 Inherited, FontFamily -> "Roboto", Selectable -> True, FontWeight -> Dynamic[ If[CurrentValue["CellStyleName"] === "Input", "DemiBold", Plain]], StripOnInput -> False]}, "Row", DisplayFunction->(PaneBox[ RowBox[{ TemplateSlotSequence[1, "\[InvisibleSpace]"]}], BaselinePosition -> Center]& ), InterpretationFunction->(RowBox[{"Row", "[", RowBox[{ RowBox[{"{", TemplateSlotSequence[1, ","], "}"}], ",", RowBox[{"BaselinePosition", "\[Rule]", "Center"}]}], "]"}]& )], Selectable -> False, Background->RGBColor[ 0.9686274509803922, 0.9686274509803922, 0.9686274509803922], ContentPadding->False, FrameMargins->{{3, 4}, {0, -2}}, FrameStyle->Directive[ AbsoluteThickness[1], RGBColor[0.8627450980392157, 0.8627450980392157, 0.8627450980392157]], RoundingRadius->3, StripOnInput->False], ResourceFunction["FileQ"], BoxID -> "FileQ"], "[", RowBox[{"FileNameJoin", "[", RowBox[{"{", RowBox[{"$TemporaryDirectory", ",", "\"\\""}], "}"}], "]"}], "]"}]], "Input", CellChangeTimes->{{3.752506466781807*^9, 3.752506468967414*^9}, 3.752506807209511*^9}, CellLabel->"In[143]:=", CellID->2000960143], Cell[BoxData["True"], "Output", CellChangeTimes->{{3.752506464422944*^9, 3.75250646942459*^9}, 3.752506637491794*^9}, CellLabel->"Out[143]=", CellID->1059312137] }, Open ]], Cell["Find a file:", "Text", CellChangeTimes->{{3.752506117072159*^9, 3.752506121027295*^9}, { 3.7525065311183777`*^9, 3.752506565712825*^9}, {3.752506792025092*^9, 3.7525067972173986`*^9}, {3.7525107512147503`*^9, 3.7525107523311357`*^9}}, CellID->1539839834], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"FileNames", "[", RowBox[{"$InstallationDirectory", "<>", "\"\\""}], "]"}]], "Input", CellChangeTimes->{{3.75251072587187*^9, 3.7525107565043592`*^9}, 3.75251119859002*^9, {3.752511617607892*^9, 3.752511640144561*^9}}, CellLabel->"In[190]:=", CellID->1493031063], Cell[BoxData[ RowBox[{"{", RowBox[{"\<\"/Applications/Mathematica.app/Contents/AddOns\"\>", ",", "\<\"/Applications/Mathematica.app/Contents/_CodeSignature\"\>", ",", "\<\"/Applications/Mathematica.app/Contents/Configuration\"\>", ",", "\<\"/Applications/Mathematica.app/Contents/Documentation\"\>", ",", "\<\"/Applications/Mathematica.app/Contents/Frameworks\"\>", ",", "\<\"/Applications/Mathematica.app/Contents/Info.plist\"\>", ",", "\<\"/Applications/Mathematica.app/Contents/Library\"\>", ",", "\<\"/Applications/Mathematica.app/Contents/MacOS\"\>", ",", "\<\"/Applications/Mathematica.app/Contents/PkgInfo\"\>", ",", "\<\"/Applications/Mathematica.app/Contents/Resources\"\>", ",", "\<\"/Applications/Mathematica.app/Contents/SystemFiles\"\>", ",", "\<\"/Applications/Mathematica.app/Contents/test.gif\"\>"}], "}"}]], "Output", CellChangeTimes->{ 3.752510732861945*^9, {3.7525116243633823`*^9, 3.75251164052489*^9}}, CellLabel->"Out[190]=", CellID->695782426] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ InterpretationBox[ FrameBox[ TemplateBox[{GraphicsBox[{ RGBColor[0.9882352941176471, 0.4, 0.25098039215686274`], Thickness[ Dynamic[ If[CurrentValue["CellStyleName"] === "Input", 0.2, 0.1]]], CircleBox[{0, 0}]}, ImageSize -> 10, BaselinePosition -> Scaled[0.05], ImagePadding -> 1],TemplateBox[{3}, "Spacer1"],StyleBox[ "\"FileQ\"", FontColor -> RGBColor[0.2784313725490196, 0.2784313725490196, 0.2784313725490196], ShowAutoStyles -> False, ShowStringCharacters -> False, FontSize -> 0.78 Inherited, FontFamily -> "Roboto", Selectable -> True, FontWeight -> Dynamic[ If[CurrentValue["CellStyleName"] === "Input", "DemiBold", Plain]], StripOnInput -> False]}, "Row", DisplayFunction->(PaneBox[ RowBox[{ TemplateSlotSequence[1, "\[InvisibleSpace]"]}], BaselinePosition -> Center]& ), InterpretationFunction->(RowBox[{"Row", "[", RowBox[{ RowBox[{"{", TemplateSlotSequence[1, ","], "}"}], ",", RowBox[{"BaselinePosition", "\[Rule]", "Center"}]}], "]"}]& )], Selectable -> False, Background->RGBColor[ 0.9686274509803922, 0.9686274509803922, 0.9686274509803922], ContentPadding->False, FrameMargins->{{3, 4}, {0, -2}}, FrameStyle->Directive[ AbsoluteThickness[1], RGBColor[0.8627450980392157, 0.8627450980392157, 0.8627450980392157]], RoundingRadius->3, StripOnInput->False], ResourceFunction["FileQ"], BoxID -> "FileQ"], "/@", "%"}]], "Input", CellChangeTimes->{3.7525116436508627`*^9}, CellLabel->"In[191]:=", CellID->966775867], Cell[BoxData[ RowBox[{"{", RowBox[{ "False", ",", "False", ",", "False", ",", "False", ",", "False", ",", "True", ",", "False", ",", "False", ",", "True", ",", "False", ",", "False", ",", "True"}], "}"}]], "Output", CellChangeTimes->{3.7525116437865677`*^9}, CellLabel->"Out[191]=", CellID->1843281281] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Possible Issues", "Subsection", CellID->95944414], Cell["FileQ does not work with directories:", "Text", CellChangeTimes->{{3.752506117072159*^9, 3.752506121027295*^9}, { 3.7525065311183777`*^9, 3.752506568150433*^9}, {3.752510108734809*^9, 3.752510122835074*^9}, {3.752510612322871*^9, 3.752510623998261*^9}, { 3.752511296189925*^9, 3.752511299705916*^9}}, CellID->610181608], Cell[BoxData[ RowBox[{ RowBox[{"filename", "=", RowBox[{"CreateDirectory", "[", "]"}]}], ";"}]], "Input", CellChangeTimes->{3.7525063922527733`*^9}, CellLabel->"In[157]:=", CellID->674292313], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ InterpretationBox[ FrameBox[ TemplateBox[{GraphicsBox[{ RGBColor[0.9882352941176471, 0.4, 0.25098039215686274`], Thickness[ Dynamic[ If[CurrentValue["CellStyleName"] === "Input", 0.2, 0.1]]], CircleBox[{0, 0}]}, ImageSize -> 10, BaselinePosition -> Scaled[0.05], ImagePadding -> 1],TemplateBox[{3}, "Spacer1"],StyleBox[ "\"FileQ\"", FontColor -> RGBColor[0.2784313725490196, 0.2784313725490196, 0.2784313725490196], ShowAutoStyles -> False, ShowStringCharacters -> False, FontSize -> 0.78 Inherited, FontFamily -> "Roboto", Selectable -> True, FontWeight -> Dynamic[ If[CurrentValue["CellStyleName"] === "Input", "DemiBold", Plain]], StripOnInput -> False]}, "Row", DisplayFunction->(PaneBox[ RowBox[{ TemplateSlotSequence[1, "\[InvisibleSpace]"]}], BaselinePosition -> Center]& ), InterpretationFunction->(RowBox[{"Row", "[", RowBox[{ RowBox[{"{", TemplateSlotSequence[1, ","], "}"}], ",", RowBox[{"BaselinePosition", "\[Rule]", "Center"}]}], "]"}]& )], Selectable -> False, Background->RGBColor[ 0.9686274509803922, 0.9686274509803922, 0.9686274509803922], ContentPadding->False, FrameMargins->{{3, 4}, {0, -2}}, FrameStyle->Directive[ AbsoluteThickness[1], RGBColor[0.8627450980392157, 0.8627450980392157, 0.8627450980392157]], RoundingRadius->3, StripOnInput->False], ResourceFunction["FileQ"], BoxID -> "FileQ"], "[", "filename", "]"}]], "Input", CellChangeTimes->{3.752510418839138*^9}, CellLabel->"In[175]:=", CellID->1000746143], Cell[BoxData["False"], "Output", CellChangeTimes->{3.752510419545327*^9}, CellLabel->"Out[175]=", CellID->1754390622] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"FileExistsQ", "[", "filename", "]"}]], "Input", CellChangeTimes->{{3.752509706874291*^9, 3.752509735412993*^9}, 3.752510608481193*^9}, CellLabel->"In[164]:=", CellID->1442984628], Cell[BoxData["True"], "Output", CellChangeTimes->{{3.7525097099633427`*^9, 3.752509736539598*^9}}, CellLabel->"Out[164]=", CellID->913941140] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"FileType", "[", "filename", "]"}]], "Input", CellChangeTimes->{{3.752509769698896*^9, 3.752509770805287*^9}}, CellLabel->"In[165]:=", CellID->1805696636], Cell[BoxData["Directory"], "Output", CellChangeTimes->{3.752509771581749*^9}, CellLabel->"Out[165]=", CellID->516273649] }, Open ]] }, Open ]] }, WindowSize->Automatic, WindowMargins->Automatic, Visible->False, FrontEndVersion->"11.3 for Linux x86 (64-bit) (March 6, 2018)", StyleDefinitions->"Default.nb" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[580, 22, 56, 1, 70, "Subsection",ExpressionUUID->"92361860-c513-493a-8cd5-4b152bbb1d58", CellID->285421464], Cell[639, 25, 58, 1, 70, "Text",ExpressionUUID->"d175c47b-c622-4331-92df-f09a16f3c4ae", CellID->75014804], Cell[CellGroupData[{ Cell[722, 30, 296, 9, 70, "Input",ExpressionUUID->"ab3ace37-fe88-408c-a055-3af2827daaa5", CellID->387778158], Cell[1021, 41, 131, 3, 70, "Output",ExpressionUUID->"c97bc931-8e14-469f-82e3-ec343155b066", CellID->33901254] }, Open ]], Cell[CellGroupData[{ Cell[1189, 49, 1708, 42, 70, "Input",ExpressionUUID->"12e042bc-1866-420d-99cc-778e27c5266d", CellID->695209523], Cell[2900, 93, 119, 3, 70, "Output",ExpressionUUID->"a79aa785-8ffd-46d8-a50b-fc12ffdc7a12", CellID->2128890558] }, Open ]], Cell[3034, 99, 225, 4, 70, "Text",ExpressionUUID->"a1554cae-add7-475f-88eb-91b71f163152", CellID->221583938], Cell[3262, 105, 268, 8, 70, "Input",ExpressionUUID->"710b45d9-91b8-40d0-9c97-f812f4b9ed05", CellID->1934183775], Cell[CellGroupData[{ Cell[3555, 117, 1881, 47, 70, "Input",ExpressionUUID->"8e8caded-eda7-4c39-9104-1b57c784ef04", CellID->2000960143], Cell[5439, 166, 168, 4, 70, "Output",ExpressionUUID->"4ed3e002-40ae-4789-8e6d-63dbab5cc007", CellID->1059312137] }, Open ]], Cell[5622, 173, 267, 4, 70, "Text",ExpressionUUID->"c723578f-07b1-4d3f-ab6e-887922d4fe8f", CellID->1539839834], Cell[CellGroupData[{ Cell[5914, 181, 300, 6, 70, "Input",ExpressionUUID->"2239fd3b-69f9-4c53-aa05-b33050fd6b1e", CellID->1493031063], Cell[6217, 189, 1022, 18, 70, "Output",ExpressionUUID->"a2937762-9b91-4f56-99cd-622e0a9370d9", CellID->695782426] }, Open ]], Cell[CellGroupData[{ Cell[7276, 212, 1704, 42, 70, "Input",ExpressionUUID->"985e5bf9-baff-4a9f-9a49-2f34b1baa8b7", CellID->966775867], Cell[8983, 256, 319, 8, 70, "Output",ExpressionUUID->"9399949f-7f25-411e-b8f3-89f5290a3e60", CellID->1843281281] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[9351, 270, 56, 1, 70, "Subsection",ExpressionUUID->"bd770f71-57a8-414c-a3c4-0f8ab4067fd1", CellID->95944414], Cell[9410, 273, 334, 5, 70, "Text",ExpressionUUID->"a4bbb8dc-d57f-4399-a52e-71b2f7e7e31f", CellID->610181608], Cell[9747, 280, 201, 6, 70, "Input",ExpressionUUID->"09c07f02-0a6a-4cb3-8843-ef2d3fa58e30", CellID->674292313], Cell[CellGroupData[{ Cell[9973, 290, 1714, 42, 70, "Input",ExpressionUUID->"9dea49ff-cb08-4136-bb4d-9ef79ce07d23", CellID->1000746143], Cell[11690, 334, 120, 3, 70, "Output",ExpressionUUID->"13564795-3e88-4cf8-8767-d6bd9f59f2d7", CellID->1754390622] }, Open ]], Cell[CellGroupData[{ Cell[11847, 342, 209, 5, 70, "Input",ExpressionUUID->"c27ff1d3-b251-49fb-811c-c60a3e162448", CellID->1442984628], Cell[12059, 349, 144, 3, 70, "Output",ExpressionUUID->"114af961-d03e-4aca-b8a6-52e85e545be7", CellID->913941140] }, Open ]], Cell[CellGroupData[{ Cell[12240, 357, 180, 4, 70, "Input",ExpressionUUID->"363a4a8b-7ba0-4b91-ad05-7886a55be326", CellID->1805696636], Cell[12423, 363, 123, 3, 70, "Output",ExpressionUUID->"d44dedee-0747-434e-aed1-12602eff07d7", CellID->516273649] }, Open ]] }, Open ]] } ] *) (* End of internal cache information *)